Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18609] Android: The number of log messages from closing a window increases every time a window is closed

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-02-25T22:17:21.000+0000
Affected Version/sRelease 3.5.0, Release 3.5.1, Release 4.0.0
Fix Version/sRelease 4.0.0
ComponentsAndroid
Labelsqe-3.5.1
ReporterEwan Harris
AssigneeHieu Pham
Created2015-02-24T20:51:23.000+0000
Updated2015-04-13T15:16:52.000+0000

Description

Description

When building an application to device and then opening and closing a window the message 'Window: Window is closed normally'. If the window is opened and closed multiple times then the messaged is printed out equal to the number of times it has been opened and closed. This is *not a regression* as it occurs in 3.5.0.GA SDK The logging appears to be coming from line 72 in *android/modules/ui/src/js/window.js* If the app is packaged and installed onto device then the code at that line is not executed as the if statement does not trigger For example, see the below log output where I have opened and closed the window 3 times
[DEBUG] :  Window: Checkpoint: postWindowCreated()
[DEBUG] :  Window: Window is closed normally.
[DEBUG] :  Window: Checkpoint: postWindowCreated()
[DEBUG] :  Window: Window is closed normally.
[DEBUG] :  Window: Window is closed normally.
[DEBUG] :  Window: Checkpoint: postWindowCreated()
[DEBUG] :  Window: Window is closed normally.
[DEBUG] :  Window: Window is closed normally.
[DEBUG] :  Window: Window is closed normally.

Steps To Reproduce

1. Add the attached app.js to an existing project 2. Build the app to an Android device 3. Tap the button to open a window 4. Use the Android back button or the 'Close window button' on screen 5. Repeat steps 3 and 4

Actual Result

4. The window will close '\[DEBUG] : Window: Window is closed normally.' will be printed in the console. As expected 5. For each time you repeat the above steps the number of log message will increase

Expected Result

5. There should only be one of the above log messages shown when a window is closed

Attachments

FileDateSize
app.js2015-02-24T20:51:23.000+00001012

Comments

  1. Hieu Pham 2015-02-25

    master PR: https://github.com/appcelerator/titanium_mobile/pull/6661
  2. Ewan Harris 2015-03-04

    Verified fix on: Mac OSX 10.10.2 Appcelerator Studio, build: 4.0.0.201502171827 Titanium SDK build: 4.0.0.v20150303161012 Titanium CLI, build: 3.5.0-dev Alloy: 1.5.1 Android build tools: 21.1.2 Nexus 5 (5.0.1) When closing a window the log message is now printed only once each time. Closing ticket.
  3. Iker 2015-04-13

    Hi Titanium Support Team, Is it meaning that i have to wait for Titanium SDK version 4.0.0? Because it was not published yet! Thank you.

JSON Source