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

iOS - KrollObject forgetKeylessKrollObject

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Backlog
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      Titanium SDK ==> 3.5.0.GA
      XCode ==> 6
      OS ==> OS X 10.10.1
      CLI ==> 3.4.1
      Platform ==> iOS 9.x (Devices)

      Description

      Recently we have received a crash on one of our application with the following stack trace:

      0     libobjc.A.dylib                       0x00000001806c1bd0 objc_msgSend + 12
      1     CoreFoundation                        0x0000000180f72d90 -[NSInvocation retainArguments] + 208
      2     Foundation                            0x00000001819e86b4 -[NSInvocationOperation initWithInvocation:] + 72
      3     Foundation                            0x00000001819e85c8 -[NSInvocationOperation initWithTarget:selector:object:] + 216
      4     MyApp                                 0x0000000100054500 -[KrollObject forgetKeylessKrollObject:] (KrollObject.m:1079)
      5     MyApp                                 0x00000001000a1cac -[TiProxy forgetProxy:] (TiProxy.m:725)
      6     MyApp                                 0x000000010005b070 -[TiViewProxy remove:] (TiViewProxy.m:261)
      7     MyApp                                 0x00000001000ba294 __TiThreadPerformOnMainThread_block_invoke (TiBase.m:270)
      8     MyApp                                 0x00000001000ba570 TiThreadProcessPendingMainThreadBlocks (TiBase.m:367)
      9     libdispatch.dylib                     0x0000000180a95630 _dispatch_call_block_and_release + 20
      10   libdispatch.dylib                      0x0000000180a955f0 _dispatch_client_callout + 12
      11   libdispatch.dylib                      0x0000000180a9acf8 _dispatch_main_queue_callback_4CF + 1840
      12   CoreFoundation                         0x0000000180ff8bb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
      13   CoreFoundation                         0x0000000180ff6a18 __CFRunLoopRun + 1624
      14   CoreFoundation                         0x0000000180f25680 CFRunLoopRunSpecific + 380
      15   GraphicsServices                       0x0000000182434088 GSEventRunModal + 176
      16   UIKit                                  0x0000000185d9cd90 UIApplicationMain + 200
      17   MyApp                                  0x000000010003c584 main (main.m:37)
      

      Dashboard suggests that the crash has happened at forgetKeylessKrollObjject method. From the stack trace it seems that during a view removal, this incident happened. There are many places in the code where we have added and removed view. As there is no definite place defined in the log and nor we have the test case, we went through the framework code and saw that there is no null handling inside the method as TiProxy.m --> krollObjectForBridge function can return nil.

      Again, in the javascript code, if we do something like:

      window.remove(null);
      

      We too can see that TiViewProxy remove is called, but the application does not crash due to ENSURE_ARGS check I guess. Hence does it mean that the issue is occurring due to scenario where the UI has been garbage collected but not set to null for which it is trying to clean it.

      Also this issue does not occur everyday, rather 3-5 times a week across several iOS devices with majorly running iOS 9. We do not have a test case, we only get the same stack trace from the dashboard.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              soumyakantikar Soumya Kanti Kar
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

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

                  Git Source Code