Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1916] randomly xhr requests do not kill the loading indicator

GitHub Issuen/a
Resolution Date2011-04-17T01:57:32.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
Labelsdefect, ios, ipad, iphone, rplist, xhr
AssigneeBlain Hamon


On the iphone, sdks 4.x and Ti sdk 1.4.x at random xhr requests do not kill the loading indicator when the onload event fires. Customer reproduced this using the KS xhr examples.


  1. Gunther Brunner 2011-04-15

    Hi, I have to add that on Android 2.1/Ti 1.4.2 I've had the same problem.
    But I just cannot reproduce it most of the times. I think there's some problem with the events firing. I've had to replace most of my code with callback functions because of this.

  2. Greg Pierce 2011-04-15

    This is not random in trunk as of this week. It's consistent on every HTTPClient request on iOS SDK 4.1/1.4.2. Both in simulator and on the device. I can't release an app with this, it's unprofessional to leave that spinner flying.

  3. Stephen Tramer 2011-04-15

    Able to reproduce in KS: KS->Platform->XHR->File Download->Large File Download. Ignore earlier requests for more information, sorry guys.

  4. Jeff Haynie 2011-04-15

    (from [67c9341488bf72b0f066978cc4ca860daa2ee788]) [#1916 state:fixed-in-qa] Proper return value check for stopNetwork, use OS barrier methods now to ensure order of ops. http://github.com/appcelerator/titanium_mobile/commit/67c9341488bf72b0f066978cc4ca860daa2ee788"> http://github.com/appcelerator/titanium_mobile/commit/67c9341488bf7...

  5. Stephen Tramer 2011-04-15

    Thom, assigning this to you so that you can confirm and I can patch into 1_4_X ASAP.

  6. Thomas Huelbert 2011-04-15

    Using I am still seeing the spinner persist using KS->Platform->XHR->File Download->Large File Download 4.1 4th gen ipod touch

  7. Jeff Haynie 2011-04-15

    (from [ff572d3112aab7152833835e71988245a66cb6fa]) [#1916 state:fixed-in-qa] For real this time, as the in/decrements are atomic, the if statement is not. It's easier and faster to do this all on the main thread instead of locks. http://github.com/appcelerator/titanium_mobile/commit/ff572d3112aab7152833835e71988245a66cb6fa"> http://github.com/appcelerator/titanium_mobile/commit/ff572d3112aab...

  8. Blain Hamon 2011-04-15

    Closing as per Thom. After fix, could not recreate, and the new logic should be rather robust in this.

  9. Marko Perutovic 2011-04-15

    well, in today nightly it's still broken in KS

  10. Sj101 2011-04-15

    Still an issue here from nightly build.

  11. Sj101 2011-04-15

    My comment is referring to iPhone 4 and stimulator, have not tested on iPad.

  12. Stephen Tramer 2011-04-15

    Nightly builds are done off of 1_4_X, our guaranteed stable branch. Fixes are checked into a different branch. I will put the patch into the appropriate branch and then you should be able to get an updated nightly build. If you require the latest Titanium you may always obtain it from http://github.com/appcelerator/titanium_mobile/tarball/master">http://github.com/appcelerator/titanium_mobile/tarball/master.

JSON Source