Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9090] iOS: Timing out waiting on main thread causing rejections

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-07-10T23:40:06.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-11 Core
ComponentsiOS
Labelscore, module_package, qe-testadded
ReporterEduardo Gomez
AssigneeStephen Tramer
Created2012-05-09T22:10:06.000+0000
Updated2013-10-09T23:48:09.000+0000

Description

Attachments

FileDateSize
FirstRun_iOS5_2.0.1.GA2.jpg2012-05-10T08:52:42.000+000043310
SecondRun_iOS5_2.0.1.GA2.jpg2012-05-10T08:52:42.000+000024402
test.zip2012-05-10T08:52:42.000+00002383305

Comments

  1. Stephen Tramer 2012-05-09

    We require a full reproduction case to address this ticket. The warning is being taken care of as part of TIMOB-9002.
  2. Eduardo Gomez 2012-05-10

    Uploading developer resources to reproduce.

    test.zip

    UnZip test project into Studio

    FirstRun_iOS5_2.0.1.GA2.jpg

    Warning might appear at the first run

    SecondRun_iOS5_2.0.1.GA2.jpg

    Warning doesn't appear when running by second time

    Brief summary

    If developer deletes app from simulator and run it again the warn will appear again. I've been trying to reproduce it locally but I can't see such warning message yet.

    My console output

    {noformat} [INFO] One moment, building ... [INFO] Titanium SDK version: 2.0.1 (04/12/12 16:33 999c68a) [INFO] iPhone Device family: iphone [INFO] iPhone SDK version: 5.0 [INFO] iPhone simulated device: iphone [INFO] Launching application in Simulator [INFO] Launched application in Simulator (3.78 seconds) [INFO] Application started [INFO] test/1.0 (2.0.1.GA2.999c68a) {noformat}
  3. Eduardo Gomez 2012-05-11

    I just bumped with this issue again having set the following settings:

    Console output:

       [INFO] One moment, building ...
       [INFO] Titanium SDK version: 2.0.1 (04/12/12 16:33 999c68a)
       [INFO] iPhone Device family: iphone
       [INFO] iPhone SDK version: 4.3
       [INFO] iPhone simulated device: iphone
       [INFO] Launching application in Simulator
       [INFO] Launched application in Simulator (3.86 seconds)
       [INFO] Application started
       [INFO] test/1.0 (2.0.1.GA2.999c68a)
       [WARN] Timing out waiting on main thread. Possibly a deadlock?  in TiThreadPerformOnMainThread (TiBase.m:238)
       

    app.js

       var win = Titanium.UI.createWindow();
       
       var win1 = Titanium.UI.createWindow({
           backgroundColor:"red",
           title:"Red Window"
       });
       win1.addEventListener('click', function(){
           nav.open(toolsWindow);
       });
       
       var nav = Titanium.UI.iPhone.createNavigationGroup({
          window: win1
       });
       
       var toolsWindow = Ti.UI.createWindow({
           title: 'Blue Window',
           url: 'tools_window.js',
           nav: nav,
           exitOnClose: false,
           backgroundColor: 'blue'
       });
       
       win.add(nav);
       win.open();
       

    tools_window.js

       var win = Ti.UI.currentWindow;
       
       var button = Ti.UI.createButton({
           title: 'close',
           height: 40,
           width: 300
       });
       button.addEventListener('click', function(e) {
           Ti.API.info('clicked close');
           win.nav.close(win);
       });
       
       win.add(button);
       
    Having launch the emulator and close it then warning did not appear over again.
  4. Blain Hamon 2012-05-15

    Ironically enough, this looks like a case where the warning was completely correct and valid. That is, *something* caused an infinite loop or deadlock with the main thread, (May or may not be related to the perform on main thread) and the perform on main thread code is saying the formal equivalent of "Hey guys, the main thread hasn't processed my request in over a full second (A long amount of time). Is there a deadlock or something going on?"
  5. Pedro Enrique 2012-05-18

    To reproduce: Build the app (I can provide the source code) for distribution, as if it were going to the AppStore. Get the .ipa and drag and drop to iTunes. Then open the app. It will not pass the splash screen.
  6. Stephen Tramer 2012-05-22

    Customer indicated this was a module location problem - they were including the module but it apparently was not found, and the build did *not* fail gracefully.
  7. Stephen Tramer 2012-05-22

    TESTING

    ----

    Create a new app in TiStudio

    Add a module to the project in the tiapp.xml which does not exist such as <module version="1.0">not.there</module>

    Run a build for simulator, device, packaging

    *PASS:* The build fails *FAIL:* Any other result
  8. Max Stepanov 2012-05-24

    PR merged https://github.com/appcelerator/titanium_mobile/pull/2247
  9. Mukesh Gadiya 2012-06-23

    SDK: 2.1.0.v20120622174154 iOS sim : 5.1 iphone 4s Verizon Verified that: 1. Create a new app in TiStudio 2. Add a module to the project in the tiapp.xml which does not exist such as not.there 3. Run a build for iOS simulator, iOS device 4. The build fails
  10. Mukesh Gadiya 2012-06-23

    The iOS version on the iPhone 4s verizon was 5.0.1
  11. Shyam Bhadauria 2012-07-10

    Re-opening to edit label

JSON Source