[TIMOB-15273] Android: Debug output race condition results in no output
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2013-10-17T20:24:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | triage |
Reporter | Shak Hossain |
Assignee | Shak Hossain |
Created | 2013-08-23T20:28:40.000+0000 |
Updated | 2017-03-16T20:46:44.000+0000 |
Description
Steps to Reproduce
1. create 'location' event listener
2. Add Ti.API.debug output code to event listener
3. Run application several times to observe debug output results
Actual Result
In a non-deterministic way, some runs result in debug output to the console, while others produce no output at all in the console, even from Ti.API.debug unrelated to the 'location' event listener, resulting in a totally blank console window. On a 'good' run I would expect to see output even before the first location event first triggers.
For a while I was convinced certain debug statements were causing the issue, but then I noticed conflicting results going back and forth between code revisions, until finally I started back to back runs on the same code and observed the reported behaviour. I have recently updated Titanium studio and the SDK, and while the issue arose around about that time, that was also about when I began writing the 'location' event code so I cannot say with certainty that the updates are part of the issue.
I have attached my index.js source file from my current project since it may be easier for you to reproduce by starting with it.
Obviously productivity hits rock bottom without reliable debug output, hence severity 'blocker'
Expected Result
Debug output should display in the console.
Attachments
Note there is a bug in the code: the line var R = 6371; // km should be moved to before function accurateDistance. This does not effect the errant behavior reported.
Added alloy.js
Apologies that I did not mention platform, but I have been developing on IOS. However, this bug manifests using the iphone simulator as well as while debugging the device.
Since reporting this bug I have noticed a *flash* of output to the console before it disappears and no longer displays anything.
[~shossain] Can you please test this in 3.1.3.GA?
Please let us know if this still continues to be an issue.
Closing ticket as the information that was requested was never provided.