Skip to content

Using custom objects crashes iOS7 #540

Closed
rdougan opened this Issue Aug 12, 2013 · 28 comments

4 participants

@rdougan
rdougan commented Aug 12, 2013
[DTAttributedTextContentView superlayer]: unrecognized selector sent to instance

I tried tracking it down, but couldn't find the culprit.

It happens in the demo app, Custom Objects example.

@odrobnik

I am unable to reproduce this with the steps provided. Please provide exact steps for me to reproduce the issue.

I tested:

  • current develop branch version
  • launched app on iOS7 simulator
  • went into the custom objects demo

No exception.

@rdougan
rdougan commented Aug 13, 2013

I was in master, but it happens in develop for me too.

I'm using Xcode 5 DP4 with iOS7 iPhone simulator (5, retina). Doesn't happen using iOS6 simulator.

Video of it happening: http://rwd.me/Qn2l

@rdougan
rdougan commented Aug 13, 2013

In my own app, it only happens when I scroll (I think the custom object is out-of-view, and it crashes when it comes into view).

@odrobnik

@rdougan please add an exception breakpoint and show the stack when it breaks

@rdougan
rdougan commented Aug 13, 2013

screen shot 2013-08-13 at 13 47 43

@odrobnik

Please update your Xcode to DP5. For me this doesn't occur.

If you updated to all the latest versions and are still able to reproduce it, then we have to screen share for me to see what exactly the reason is. Are you using a custom object for a special type that is not a UIView?

@rdougan
rdougan commented Aug 13, 2013

OK, sorry. Didn't realise I was still on DP4. Will report back.

I'm using a very simple UIView in my app, just like the demo.

@rdougan
rdougan commented Aug 13, 2013

Still happening with DP5. Very strange..

@odrobnik

@rdougan Would you be able to demonstrate this to me via Screen sharing with Skype? I'm TheDrops.

@rdougan
rdougan commented Aug 13, 2013

Sure, I have added you.

@rdougan
rdougan commented Aug 15, 2013

It appears we can never sync on Skype. How about a fixed time? 4pm GMT+2?

@rdougan
rdougan commented Aug 15, 2013

Same issue with the latest Mavericks DP. I'm stumped.

@odrobnik

please try with the latest version in develop. Possibly a workaround for issue #496 might have fixed that as well.

@rdougan
rdougan commented Aug 16, 2013

Still no go. I also just tried completely removing all Xcode's and installing only DP5 from scratch, but still the same error. :/

@odrobnik
@odrobnik

Closing this for now as there is no way for me to reproduce.

@odrobnik odrobnik closed this Aug 22, 2013
@rdougan
rdougan commented Sep 14, 2013

Installed a clean copy of Mavericks, then the latest Xcode 5 GM build, and the issue still happens. :(

@jogloran

I'm able to reproduce this behaviour with the below. I'm happy to work with Cocoanetics to reproduce this, as this behaviour is preventing me from integrating DTCoreText.

  • DTCoreText develop@a312ece
  • Xcode 5.0 (5A1412)
  • iOS 7.0 SDK and simulator. I can't reproduce the behaviour when the simulator is iOS 6.1.

Steps:

  1. Load DTCoreText.xcodeproj
  2. Run target DemoApp
  3. Select 'Custom Objects' demo
  4. Tap anywhere in the scroll view.

Effect:

aborts with stack trace:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DTAttributedTextContentView superlayer]: unrecognized selector sent to instance 0x1c9cbc90'
*** First throw call stack:
(
    0   CoreFoundation                      0x034895e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x024508b6 objc_exception_throw + 44
    2   CoreFoundation                      0x03526903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
    3   CoreFoundation                      0x0347990b ___forwarding___ + 1019
    4   CoreFoundation                      0x034794ee _CF_forwarding_prep_0 + 14
    5   QuartzCore                          0x01da7c44 -[CALayer(CALayerPrivate) ancestorSharedWithLayer:] + 63
    6   QuartzCore                          0x01d9cb0c _ZN2CA5Layer12map_geometryEP7CALayerS2_PFvPvRKNS_4Mat4IdEEES9_S3_ + 80
    7   QuartzCore                          0x01d9d0d5 -[CALayer convertPoint:toLayer:] + 77
    8   UIKit                               0x00affde1 -[UIView(Geometry) convertPoint:toView:] + 112
    9   UIAccessibility                     0x0bf0870f -[NSObject(AXPrivCategory) _accessibilityBaseHitTest:withEvent:] + 2047
    10  UIAccessibility                     0x0bf07a4e -[NSObject(AXPrivCategory) _accessibilityHitTest:withEvent:] + 62
    11  UIKit                               0x0e8bc3b2 -[UIViewAccessibility(SafeCategory) _accessibilityHitTest:withEvent:] + 140
    12  UIKit                               0x0e8bba9c -[UIViewAccessibility(SafeCategory) __accessibilityHitTest:withEvent:] + 1231
    13  UIKit                               0x0e8bc37f -[UIViewAccessibility(SafeCategory) _accessibilityHitTest:withEvent:] + 89
    14  UIKit                               0x0e8bba9c -[UIViewAccessibility(SafeCategory) __accessibilityHitTest:withEvent:] + 1231
    15  UIKit                               0x0e8bc37f -[UIViewAccessibility(SafeCategory) _accessibilityHitTest:withEvent:] + 89
    16  UIKit                               0x0e8bba9c -[UIViewAccessibility(SafeCategory) __accessibilityHitTest:withEvent:] + 1231
    17  UIKit                               0x0e8bc37f -[UIViewAccessibility(SafeCategory) _accessibilityHitTest:withEvent:] + 89
    18  UIKit                               0x0e8bba9c -[UIViewAccessibility(SafeCategory) __accessibilityHitTest:withEvent:] + 1231
    19  UIKit                               0x0e8bc37f -[UIViewAccessibility(SafeCategory) _accessibilityHitTest:withEvent:] + 89
    20  UIKit                               0x0e8bba9c -[UIViewAccessibility(SafeCategory) __accessibilityHitTest:withEvent:] + 1231
    21  UIKit                               0x0e8bc37f -[UIViewAccessibility(SafeCategory) _accessibilityHitTest:withEvent:] + 89
    22  UIKit                               0x0e8bba9c -[UIViewAccessibility(SafeCategory) __accessibilityHitTest:withEvent:] + 1231
    23  UIKit                               0x0e8bc37f -[UIViewAccessibility(SafeCategory) _accessibilityHitTest:withEvent:] + 89
    24  UIAccessibility                     0x0bf02b6d _copyElementAtPositionCallback + 1357
    25  AXRuntime                           0x0bf63a3d _AXXMIGCopyElementAtPosition + 170
    26  AXRuntime                           0x0bf5e97b _XCopyElementAtPosition + 340
    27  AXRuntime                           0x0bf696c8 mshMIGPerform + 256
    28  CoreFoundation                      0x03404dd5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    29  CoreFoundation                      0x03404b0b __CFRunLoopDoSource1 + 523
    30  CoreFoundation                      0x0342f7ec __CFRunLoopRun + 2156
    31  CoreFoundation                      0x0342eb33 CFRunLoopRunSpecific + 467
    32  CoreFoundation                      0x0342e94b CFRunLoopRunInMode + 123
    33  GraphicsServices                    0x038619d7 GSEventRunModal + 192
    34  GraphicsServices                    0x038617fe GSEventRun + 104
    35  UIKit                               0x00aa894b UIApplicationMain + 1225
    36  RTDemoApp                           0x0000bcf6 main + 134
    37  RTDemoApp                           0x00002e35 start + 53
    38  ???                                 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
@rdougan
rdougan commented Sep 22, 2013

@jogloran This is awesome news, as I couldn't reproduce it on any other machines.

@jogloran

On further inspection, I can only reproduce this behaviour in the simulator. It doesn't appear to affect the demo on an iPhone 5 running iOS 7.0 (11A465).

@rdougan
rdougan commented Sep 22, 2013

Same with me. It must be something to do with how the Simulator has been installed, the machine, or Xcode.

@jogloran

I'm happy to chalk this up to an SDK/simulator bug for now, if it doesn't appear when run on a device. The problem looks to be deep in UIKit.

@rdougan
rdougan commented Nov 15, 2013

Ahh!

@rdougan
rdougan commented Nov 15, 2013

FYI, this still happens for me, even with Accessibility turned off. I'm assuming I have some system wide preference turned on (that I haven't managed to find and turn off, yet..).

@odrobnik

Another person found that BetterTouchTool was his trigger. Can be any Mac app using accessibility.

@jogloran

I'm using Moom (manytricks.com/moom/) which I believe to be Accessibility based.

@vguerci
vguerci commented May 6, 2014

Confirm that in my case BetterToutchTool was causing this. Quitting it solves that problem.

@aerych aerych referenced this issue in wordpress-mobile/WordPress-iOS Dec 1, 2014
Closed

Reader: Crash using voice over when encountering an image #2860

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.