forcedotcom / SalesforceMobileSDK-iOS

iOS SDK for Salesforce
Other
538 stars 421 forks source link

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at SFApplication sendEvent #1173

Closed brad36 closed 9 years ago

brad36 commented 9 years ago

Getting the following crash in SFApplication.m line 72, on both 8.3 and 8.4 running SDK 3.3.0

Thread : Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x0000000198647bd0 objc_msgSend + 16 1 UIKit 0x000000018b9c9f3c -[UIWindow setDelegate:] + 132 2 UIKit 0x000000018bc5c49c -[UIPresentationController runTransitionForCurrentState] + 596 3 UIKit 0x000000018bc7985c -[UIViewController _dismissViewControllerWithAnimationController:interactionController:completion:] + 548 4 UIKit 0x000000018ba7c364 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 852 5 UIKit 0x000000018ba243f4 -[UIViewController dismissViewControllerWithTransition:completion:] + 1036 6 UIKit 0x000000018ba23f88 -[UIViewController dismissViewControllerAnimated:completion:] + 252 7 UIKit 0x000000018bd32f90 -[UIAlertController _dismissAnimated:triggeringAction:triggeredByPopoverDimmingView:] + 420 8 UIKit 0x000000018b947fc0 _UIGestureRecognizerUpdate + 8536 9 UIKit 0x000000018b982898 -[UIWindow _sendGesturesForEvent:] + 1044 10 UIKit 0x000000018b981f50 -[UIWindow sendEvent:] + 660 11 UIKit 0x000000018b95518c -[UIApplication sendEvent:] + 264 12 iPath 0x00000001002083cc -SFApplication sendEvent: 13 UIKit 0x000000018bbf6324 _UIApplicationHandleEventFromQueueEvent + 15424 14 UIKit 0x000000018b9536a0 _UIApplicationHandleEventQueue + 1716 15 CoreFoundation 0x0000000186ecc240 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24 16 CoreFoundation 0x0000000186ecb4e4 CFRunLoopDoSources0 + 264 17 CoreFoundation 0x0000000186ec9594 CFRunLoopRun + 712 18 CoreFoundation 0x0000000186df52d4 CFRunLoopRunSpecific + 396 19 GraphicsServices 0x00000001904e36fc GSEventRunModal + 168 20 UIKit 0x000000018b9bafac UIApplicationMain + 1488 21 iPath 0x0000000100096308 main (main.m:33) 22 libdyld.dylib 0x0000000198cb2a08 start + 4

khawkins commented 9 years ago

[SFApplication sendEvent] overrides [UIApplication sendEvent:], does some minor SDK-related work, then hands off to the super class method. As sendEvent: is the entry point for all UI-related activities, it's understandably going to catch a lot of errors whose root causes lie downstream of it.

That's the case here as well. It looks like you need to look at your view controller transitions and try to understand where there might be race condition there, or accessing a controller that's being deallocated, etc.

This is not a Mobile SDK issue.

brad36 commented 9 years ago

Ok, I appreciate the feedback.