Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-5180

iOS: Ti.API.info crashes if passed a window when debugging

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 1.7.2
    • Fix Version/s: Sprint 2011-40
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      TiSDK 1.7.2
      iOS Simulator 4.3

      Description

      If you pass Ti.API.info() a window in when debugging, the app will crash. If you just run the app in the simulator without debugging it works as expected and does not crash.

      Step 1: run the code below in debug mode
      Step 2: notice the app crash

      app.js

      var win = Ti.UI.createWindow({
        backgroundColor:"#fff",
        title:"My App"
      });
      win.open();
       
      Ti.API.info(win);
      // Ti.API.info("win: "+win);
      

      console

      [ERROR] The application has crashed with an unhandled exception. Stack trace:
       
      0   CoreFoundation                      0x025c758c __exceptionPreprocess + 156
      1   libobjc.A.dylib                     0x0271b313 objc_exception_throw + 44
      2   CoreFoundation                      0x025c90bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
      3   CoreFoundation                      0x02538966 ___forwarding___ + 966
      4   CoreFoundation                      0x02538522 _CF_forwarding_prep_0 + 50
      5   Test2                               0x00405227 -[TiDebugger log:level:] + 134
      6   Test2                               0x00406cac TiDebuggerLogMessage + 69
      7   Test2                               0x001433c6 -[APIModule logMessage:severity:] + 486
      8   Test2                               0x001435b3 -[APIModule info:] + 147
      9   CoreFoundation                      0x02537c7d __invoking___ + 29
      10  CoreFoundation                      0x02537b51 -[NSInvocation invoke] + 145
      11  Test2                               0x0004dcf9 -[KrollMethod call:] + 3081
      12  Test2                               0x0004c79e KrollCallAsFunction + 542
      13  Test2                               0x002d92b9 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 391
      14  Test2                               0x002b657b cti_op_call_NotTiFunction + 299
      15  ???                                 0x08fc0875 0x0 + 150734965
      16  Test2                               0x00273502 _ZN2TI11Interpreter7executeEPNS_17ProgramExecutableEPNS_10TiExcStateEPNS_14ScopeChainNodeEPNS_8TiObjectEPNS_7TiValueE + 648
      17  Test2                               0x00242f34 _ZN2TI8evaluateEPNS_10TiExcStateERNS_10ScopeChainERKNS_10SourceCodeENS_7TiValueE + 388
      18  Test2                               0x002bd109 TiEvalScript + 297
      19  Test2                               0x00042112 -[KrollBridge evalFileOnThread:context:] + 2082
      20  Test2                               0x000496e7 -[KrollInvocation invoke:] + 135
      21  Test2                               0x000475de -[KrollContext invokeOnThread:method:withObject:callback:selector:] + 286
      22  Test2                               0x000418de -[KrollBridge evalFile:callback:selector:] + 126
      23  Test2                               0x00041223 -[KrollBridge didStartNewContext:] + 2579
      24  Test2                               0x0004626e -[KrollContext main] + 3214
      25  Foundation                          0x008b6cf4 -[NSThread main] + 81
      26  Foundation                          0x008b6c80 __NSThread__main__ + 1387
      27  libSystem.B.dylib                   0x92170259 _pthread_start + 345
      28  libSystem.B.dylib                   0x921700de thread_start + 34
      

      Workaround

      concatenate the window with a string.
      Ti.API.info("win: "+win);

      Associated Helpdesk Ticket

      httP://appc.me/c/APP-794556

        Attachments

          Activity

            People

            • Assignee:
              blainhamon Blain Hamon
              Reporter:
              jalter Jon Alter
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-4389
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration