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

iOS: Simulator can crash because of the "trackUserInteraction" feature

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 8.0.0, Release 7.5.0, Release 8.1.0
    • Fix Version/s: Release 8.1.0
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      SDK 7.5 and up, Simulator only

      Description

      In TIMOB-26294, the Ti.App.trackUserInteraction property and userinteraction event have been added. On iOS, this can lead to crashes because other receivers of the UIApplicationDelegate method sendEvent: can influence the way this method behaves because the super call is before the override-implementation. Quote Apple:

      If you require it, you can intercept incoming events by subclassing UIApplication and overriding this method. For every event you intercept, you must dispatch it by calling [super sendEvent:event] after handling the event in your implementation.

      So the fix is to simply move the super-call after the implementation. The Crashlytics stack-trace to prove this crash:

      com.apple.main-thread
      0  QuartzCore                     0x108be3fbf classDescription(objc_class*) + 16
      1  QuartzCore                     0x108be53d8 CAObject_defaultValueForAtom + 28
      2  QuartzCore                     0x108b77f03 CA::Layer::default_value(unsigned int, _CAValueType, void*) + 125
      3  QuartzCore                     0x108b76fea CA::Layer::getter(unsigned int, _CAValueType, void*) + 106
      4  QuartzCore                     0x108b84ae7 ___ZL36cons_CALayer_kCAValueAssignedPointerjb_block_invoke + 57
      5  UIKitCore                      0x1180e6967 _UIViewLayerGetView + 40
      6  UIKitCore                      0x1180d87ec __scrollViewAncestorOfView + 105
      7  UIKitCore                      0x118054ead -[UIScrollView setBounds:] + 537
      8  UIKitCore                      0x117e327aa -[UITableView setBounds:] + 234
      9  UIKitCore                      0x118056333 -[UIScrollView setContentOffset:] + 509
      10 UIKitCore                      0x117e33b58 -[UITableView setContentOffset:] + 311
      11 UIKitCore                      0x11805bdf1 -[UIScrollView _updatePanGesture] + 2464
      12 UIKitCore                      0x1177f914d -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 57
      13 UIKitCore                      0x117801c69 _UIGestureRecognizerSendTargetActions + 109
      14 UIKitCore                      0x1177ff5ba _UIGestureRecognizerSendActions + 311
      15 UIKitCore                      0x1177fe897 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 966
      16 UIKitCore                      0x1177f0c4e _UIGestureEnvironmentUpdate + 2820
      17 UIKitCore                      0x1177f0108 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 478
      18 UIKitCore                      0x1177efe96 -[UIGestureEnvironment _updateForEvent:window:] + 200
      19 UIKitCore                      0x117c4b5bc -[UIWindow sendEvent:] + 4057
      20 UIKitCore                      0x117c29d16 -[UIApplication sendEvent:] + 356
      21 MyApp                          0x1045eef14 -[TiUIApplication sendEvent:] (TiUIApplication.m:18)
      22 UIKitCore                      0x117cfa293 __dispatchPreprocessedEventFromEventQueue + 3232
      23 UIKitCore                      0x117cfcbb9 __handleEventQueueInternal + 5911
      24 CoreFoundation                 0x10ede5be1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      25 CoreFoundation                 0x10ede5463 __CFRunLoopDoSources0 + 243
      26 CoreFoundation                 0x10eddfb1f __CFRunLoopRun + 1231
      27 CoreFoundation                 0x10eddf302 CFRunLoopRunSpecific + 626
      28 GraphicsServices               0x11368d2fe GSEventRunModal + 65
      29 UIKitCore                      0x117c0fba2 UIApplicationMain + 140
      30 MyApp                          0x104577902 main (main.m:66)
      31 libdyld.dylib                  0x1109ad541 start + 1
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jvennemann Jan Vennemann
                Reporter:
                hknoechel Hans Knöchel
                Reviewer:
                Jan Vennemann
              • Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code