Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2232] iPhones Activity Indicator continues spinning

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:29.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsdefect, ios, iphone
ReporterSebastianK
AssigneeReggie Seagraves
Created2011-04-15T03:14:18.000+0000
Updated2011-04-17T01:58:29.000+0000

Description

After finishing a XHR request at the current nightly build of 1.4.2, the iPhone Activity Indicator does not stop to spin. The error did not occur in a nightly build from the 24th of September. The big issue is that the user thinks that there is still traffic and gets nervous about his/her phone bill.

Please see here:
http://developer.appcelerator.com/question/65381/iphones-activity-indicator-continues-after-load"> http://developer.appcelerator.com/question/65381/iphones-activity-i...

Thanks for an urgent fix!

Comments

  1. crisredfi 2011-04-15

    hi, we are having the same problem.

    I tried to make it stop by the comand .close() after the XHR code, but it's not always working at all.

    please it's urgent...

    thanks!!

  2. SebastianK 2011-04-15

    Here is my test case to reproduce the infinitely spinning activity indicator. I tried to make the test case as simple as possible and the bug still occurs. I tested unter Titanium Mobile Nightly Build of 1.4.2 from beginning November. The bug appears under iPhone Simulator and on an iPhone 3G with iOS 4.1. I also tried to set a timeout value or to close the xhr object but nothing helped:

           Ti.API.info("fire XHR call");
           var url="http://www.google.com"; //place any url here
           var params={}; 
           var xhr = Titanium.Network.createHTTPClient();
           xhr.onreadystatechange = function()
           {
               if(this.readyState==4)
               {
                   Ti.API.info("XHR call returns: "+this.responseText);
               }
           }
           xhr.onerror = function(){Ti.API.info("an error did occur");};
           xhr.open("GET", url);
           xhr.send(params);
       

    As you will see, the connection works fine, but the activity indicator continous spinning even after receiving of the data.

  3. kevinwhinnery 2011-04-15

    Sebastian,

    I pasted your code into a project running http://builds.appcelerator.com.s3.amazonaws.com/index.html">our latest build on iOS 4.2 and everything seems to work as expected (call returns, outputs to console, and activity indicator in the status bar disappears. Maybe the the issue is related to your current combination of Titanium SDK and iOS SDK?

  4. SebastianK 2011-04-15

    Kevin,

    it works now after an update to the latest nightly build of 1.4.3 - thanks!

    Sebastian

  5. kevinwhinnery 2011-04-15

    cool - closing

JSON Source