Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15273] Android: Debug output race condition results in no output

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionNeeds more info
Resolution Date2013-10-17T20:24:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelstriage
ReporterShak Hossain
AssigneeShak Hossain
Created2013-08-23T20:28:40.000+0000
Updated2017-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

FileDateSize
.log2013-08-23T20:31:29.000+00007241114
alloy.js2013-08-24T01:39:04.000+00001103
diagnostic5935284193902147469.log2013-08-23T20:31:33.000+000012642
index.js2013-08-23T20:31:35.000+000017906
index.tss2013-08-23T20:31:37.000+0000912
index.xml2013-08-23T20:31:36.000+00001476

Comments

  1. Pete Rowley 2013-08-23

    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.
  2. Pete Rowley 2013-08-24

    Added alloy.js
  3. Pete Rowley 2013-09-18

    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.
  4. Pete Rowley 2013-09-18

    Since reporting this bug I have noticed a *flash* of output to the console before it disappears and no longer displays anything.
  5. Ingo Muschenetz 2013-09-20

    [~shossain] Can you please test this in 3.1.3.GA?
  6. Ingo Muschenetz 2013-10-17

    Please let us know if this still continues to be an issue.
  7. Lee Morris 2017-03-16

    Closing ticket as the information that was requested was never provided.

JSON Source