I am getting a crash only when using Xcode 9 Beta 1 and Swift 4.
I am trying to present a view controller but an exception is thrown, even though I have several breakpoints to catch all exceptions Xcode doesn't stop anywhere.
Using lldb I was able to print the exception since Xcode didn't do it.
Here is what I got:
(lldb) po $arg1
-[UIDeviceRGBColor pointSize]: unrecognized selector sent to instance 0x60000067a6c0
(null)
Here is the stack trace:
And the backtrace:
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1 5.1
* frame #0: 0x00000001090e60f1 libobjc.A.dylib`objc_exception_throw
frame #1: 0x0000000109806494 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 132
frame #2: 0x00000001096ff858 CoreFoundation`___forwarding___ + 1432
frame #3: 0x00000001096ff238 CoreFoundation`__forwarding_prep_0___ + 120
frame #4: 0x0000000112e9f350 UIFoundation`__NSStringDrawingEngine + 3564
frame #5: 0x0000000112ea32b2 UIFoundation`-[NSAttributedString(NSExtendedStringDrawing) boundingRectWithSize:options:context:] + 787
frame #6: 0x000000010a84e96e UIKit`-[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 1022
frame #7: 0x000000010a84e33b UIKit`-[UILabel textRectForBounds:limitedToNumberOfLines:] + 68
frame #8: 0x000000010a8543c9 UIKit`-[UILabel _intrinsicSizeWithinSize:] + 167
frame #9: 0x000000010b242b24 UIKit`-[UITextField _intrinsicSizeWithinSize:] + 238
frame #10: 0x000000010b0b61ab UIKit`-[UIView(UIConstraintBasedLayout) intrinsicContentSize] + 37
frame #11: 0x000000010b0b6a00 UIKit`-[UIView(UIConstraintBasedLayout) _generateContentSizeConstraints] + 35
frame #12: 0x000000010b0b6643 UIKit`-[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 262
frame #13: 0x000000010b0c0fef UIKit`-[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 99
frame #14: 0x000000010b0bf8b7 UIKit`-[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 161
frame #15: 0x000000010b0bfebf UIKit`-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 1286
frame #16: 0x000000010b0bfd3e UIKit`-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 901
frame #17: 0x000000010b0bfd3e UIKit`-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 901
frame #18: 0x000000010b0bfd3e UIKit`-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 901
frame #19: 0x000000010b0bfd3e UIKit`-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 901
frame #20: 0x0000000107d1d1a1 Foundation`-[NSISEngine withBehaviors:performModifications:] + 131
frame #21: 0x000000010b0c06f0 UIKit`__100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 90
frame #22: 0x000000010b0bef7e UIKit`-[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 104
frame #23: 0x000000010b0c025f UIKit`-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 160
frame #24: 0x000000010b0c134f UIKit`-[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 344
frame #25: 0x000000010a66f414 UIKit`-[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 159
frame #26: 0x000000010a599e09 UIKit`-[UIPickerView layoutSubviews] + 189
frame #27: 0x000000010a59d697 UIKit`-[UIPickerView selectedRowInComponent:] + 45
frame #28: 0x000000010a5982fc UIKit`-[UIPickerView _updateSelectedRows] + 143
frame #29: 0x000000010a598396 UIKit`-[UIPickerView didMoveToWindow] + 101
frame #30: 0x000000010a67a8e1 UIKit`-[UIView(Internal) _didMoveFromWindow:toWindow:] + 1701
frame #31: 0x000000010a67a530 UIKit`-[UIView(Internal) _didMoveFromWindow:toWindow:] + 756
frame #32: 0x000000010a67a530 UIKit`-[UIView(Internal) _didMoveFromWindow:toWindow:] + 756
frame #33: 0x000000010a692e45 UIKit`-[UIScrollView _didMoveFromWindow:toWindow:] + 84
frame #34: 0x000000010a67a530 UIKit`-[UIView(Internal) _didMoveFromWindow:toWindow:] + 756
frame #35: 0x000000010a66d259 UIKit`__45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 151
frame #36: 0x000000010a66d140 UIKit`-[UIView(Hierarchy) _postMovedFromSuperview:] + 828
frame #37: 0x000000010a67d4ad UIKit`-[UIView(Internal) _addSubview:positioned:relativeTo:] + 1917
frame #38: 0x000000010a71a82b UIKit`-[UITransitionView transition:fromView:toView:removeFromView:] + 1541
frame #39: 0x000000010b2c9f29 UIKit`-[UIViewControllerBuiltinTransitionViewAnimator animateTransition:] + 1712
frame #40: 0x000000010a720845 UIKit`__56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 3003
frame #41: 0x000000010a5c46cc UIKit`_runAfterCACommitDeferredBlocks + 318
frame #42: 0x000000010a5b2cef UIKit`_cleanUpAfterCAFlushAndRunDeferredBlocks + 280
frame #43: 0x000000010a5e3091 UIKit`_afterCACommitHandler + 137
frame #44: 0x000000010971f507 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
frame #45: 0x000000010971f45e CoreFoundation`__CFRunLoopDoObservers + 430
frame #46: 0x00000001097038f4 CoreFoundation`__CFRunLoopRun + 1332
frame #47: 0x0000000109703149 CoreFoundation`CFRunLoopRunSpecific + 409
frame #48: 0x000000011182c9d7 GraphicsServices`GSEventRunModal + 62
frame #49: 0x000000010a5b891d UIKit`UIApplicationMain + 159
frame #50: 0x00000001076a1cc7 GradePoint`main at AppDelegate.swift:13
frame #51: 0x000000010d224b65 libdyld.dylib`start + 1
I understand it has to do with an unrecognized selector, but I am not doing anything with UIDeviceRGBColor or PointSize.
Not really sure what could be going on, this all works just fine when I switch over to Xcode 8.
If you would like to reproduce feel free to clone the project here and switch to the features/ios11 branch. All you have to do is finish the intro screen, and click the + button. The crash will happen instantly afterward. Run using Xcode 9 Beta 1
I understand this just might be a beta bug, but if anyone has more experience with this I would appreciate some help, if not, at least help with how to file an Xcode bug report since I've never done one.
Thanks!
UIDeviceRGBColor is technically a UIColor. pointSize is a method on UIFont. The bug happens when performing layout of a UILabel.
The most probable cause is that you are assigning a UIColor instance to a UILabel.font.
If you have an attributed string, it would be caused e.g. by attributes:
let attributes: [String: Any] = [NSFontAttributeName: UIColor.black]
Note that since attributes take Any values, there is no type checking and this can happen in Swift.
I tried downloading your code and reproducing the crash but I'm not able to see a crash. I've tried running your code on the iPhone 7 Plus simulator and on my iPhone 6S and it works fine both places. (I'm running your project on Xcode 9 Beta 1)
Could you share any more details on the environment you're running your code in? Perhaps the Swift version setting you're using (Select your target > Build Settings > Swift Language Version) or whether you've performed a Swift 4 migration? I'll be happy to look into it further.
Meanwhile, here's how to file a bug report with Apple.
[I know this content should be posted as a comment rather than an answer but I don't have enough reputation points to do that at the time of writing.]
Related
I recently downloaded Xcode 13.2.1. When I run the application it is crashing in iOS 15.2 in simulator while debugging. Also when already installed app i am launching by tapping on app icon it is running fine.
Here are backtrace:
thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
frame #0: 0x00007fff20198d24 libobjc.A.dylib`class_createInstance + 125
frame #1: 0x00007fff20112f66
frame #2: 0x00007fff20118c19
frame #3: 0x00007fff265e625d
frame #4: 0x00007fff2011383a
frame #5: 0x00007fff20114a0d
frame #6: 0x00007fff265ff8c6
frame #7: 0x00007fff265ffc0b
frame #8: 0x00007fff265ff214
frame #9: 0x00007fff2011383a
frame #10: 0x00007fff20114a0d
frame #11: 0x00007fff265ff1ee
frame #12: 0x00007fff35e0245b NetworkExtension`+[NEFilterSource filterRequired] + 35
frame #13: 0x00007fff298dde70 WebKit`WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions(WebKit::WebProcessProxy&) + 52
frame #14: 0x00007fff298ddc99 WebKit`WebKit::WebPageProxy::addPlatformLoadParameters(WebKit::WebProcessProxy&, WebKit::LoadParameters&) + 95
frame #15: 0x00007fff29988216 WebKit`WebKit::WebPageProxy::loadRequestWithNavigationShared(WTF::Ref<WebKit::WebProcessProxy, WTF::RawPtrTraits<WebKit::WebProcessProxy> >&&, WTF::ObjectIdentifier<WebCore::PageIdentifierType>, API::Navigation&, WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object*, WebCore::ShouldTreatAsContinuingLoad, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, std::__1::optional<WebKit::WebsitePoliciesData>&&, std::__1::optional<WTF::ObjectIdentifier<WebKit::NetworkResourceLoadIdentifierType> >) + 1060
frame #16: 0x00007fff29987d0d WebKit`WebKit::WebPageProxy::loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object*) + 787
frame #17: 0x00007fff2983ac3b WebKit`-[WKWebView loadRequest:] + 137
frame #18: 0x000000010c7448fa SonyLIV`___lldb_unnamed_symbol7230$$SonyLIV + 73
frame #19: 0x000000010c6fee83 SonyLIV`___lldb_unnamed_symbol5787$$SonyLIV + 88
frame #20: 0x000000010c6ff502 SonyLIV`GADDispatchAsyncSafeMainQueue + 45
frame #21: 0x000000010c6fec3d SonyLIV`___lldb_unnamed_symbol5780$$SonyLIV + 211
frame #22: 0x000000010c72aa00 SonyLIV`___lldb_unnamed_symbol6756$$SonyLIV + 622
frame #23: 0x000000010c73e9fe SonyLIV`___lldb_unnamed_symbol7124$$SonyLIV + 207
frame #24: 0x0000000114e1e848 libdispatch.dylib`_dispatch_call_block_and_release + 12
frame #25: 0x0000000114e1fa2c libdispatch.dylib`_dispatch_client_callout + 8
frame #26: 0x0000000114e2e1f1 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1197
frame #27: 0x00007fff2036c84d CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
frame #28: 0x00007fff203670aa CoreFoundation`__CFRunLoopRun + 2772
frame #29: 0x00007fff203660f3 CoreFoundation`CFRunLoopRunSpecific + 567
frame #30: 0x00007fff2c995cd3 GraphicsServices`GSEventRunModal + 139
frame #31: 0x00007fff25059f42 UIKitCore`-[UIApplication _run] + 928
frame #32: 0x00007fff2505eb5e UIKitCore`UIApplicationMain + 101
frame #33: 0x000000010ba20e9f SonyLIV`main at AppDelegate.swift:18:7
frame #34: 0x000000011247dee9 dyld_sim`start_sim + 10
frame #35: 0x000000011e4ea4fe dyld`start + 462
This crash I am getting in simulator only in device it is running fine.
Thank you :)
Reason
The error here is EXC_BAD_ACCESS, and it is occurring because of ___lldb_unnamed_symbol.
Fix
As there is no minimally reproducible code or the complete crash log.
Assuming you are using the Debug schema check if a framework in your project had been compiled for Release builds, if that's the case change the schema to Debug for that framework.
I just enabled localDataStore. Everything worked fine before, and if I comment it out everything works fine again. I want to do some local persistence, and since I can't use NSCoding for PFRelations to store objects in NSUserDefaults, my best option is localDataStore.
But it's not working.
If I login with Facebook it works fine. However, on the next app launch it crashes on this line:
[PFFacebookUtils initializeFacebook];
With the console:
-[__NSCFBoolean _loadSensitiveUserDataFromKeychainItemWithName:]: unrecognized selector sent to instance 0x37f77660
And the trace:
* thread #1: tid = 0xf318, 0x3762cc64 libobjc.A.dylib`objc_exception_throw, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x3762cc64 libobjc.A.dylib`objc_exception_throw
frame #1: 0x29e2a038 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 188
frame #2: 0x29e27f56 CoreFoundation`___forwarding___ + 714
frame #3: 0x29d59df8 CoreFoundation`_CF_forwarding_prep_0 + 24
frame #4: 0x00697a4c LY`+[PFUser currentUser](self=<unavailable>, _cmd=<unavailable>) + 532 at PFUser.m:928
frame #5: 0x00693d14 LY`+[PFUser(self=<unavailable>, _cmd=<unavailable>, provider=0x15d55fb0) registerAuthenticationProvider:] + 116 at PFUser.m:423
* frame #6: 0x007a5f46 LY`+[PFFacebookUtils initializeFacebookWithUrlShemeSuffix:](self=<unavailable>, _cmd=<unavailable>, urlSchemeSuffix=<unavailable>) + 98 at PFFacebookUtils.m:58
frame #7: 0x000a6f96 LY`-[AppDelegate application:didFinishLaunchingWithOptions:](self=0x15de8260, _cmd=0x2da83320, application=0x15de5420, launchOptions=0x00000000) + 1190 at AppDelegate.m:139
frame #8: 0x2d34e720 UIKit`-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 284
frame #9: 0x2d5435ae UIKit`-[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2358
frame #10: 0x2d545afa UIKit`-[UIApplication _runWithMainScene:transitionContext:completion:] + 1374
frame #11: 0x2d550378 UIKit`__84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 36
frame #12: 0x2d544386 UIKit`-[UIApplication workspaceDidEndTransaction:] + 130
frame #13: 0x3056b0e8 FrontBoardServices`__31-[FBSSerialQueue performAsync:]_block_invoke + 12
frame #14: 0x29deb39c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
frame #15: 0x29dea660 CoreFoundation`__CFRunLoopDoBlocks + 216
frame #16: 0x29de8de2 CoreFoundation`__CFRunLoopRun + 762
frame #17: 0x29d37210 CoreFoundation`CFRunLoopRunSpecific + 476
frame #18: 0x29d37022 CoreFoundation`CFRunLoopRunInMode + 106
frame #19: 0x2d3483ee UIKit`-[UIApplication _run] + 558
frame #20: 0x2d3431d0 UIKit`UIApplicationMain + 1440
frame #21: 0x001310d4 LY`main(argc=1, argv=0x015a3ad0) + 116 at main.m:9
So, this "feature" seems to be resolved with the update to v1.6.3 of the Parse iOS/OS X SDK.
See this link provided by #Numereyes for the discussion and the official response...
I developed an app in Xcode 5. Until now I only tested it on a device running iOS 7. I tried running it on another device with iOS 6 but it crashes on launch in the main function without any error message in the console. The deployment target is 6.0 and I've chosen Standard architectures(armv7, armv7s) in the Build Settings.
I also checked the code for methods available only for iOS 7. Could it be that I accidentally skipped one? As for as I know I should get an error message if it doesn't recognise the method.
I'm not a newbie on iOS development, but something is skipping my attention. Do you have any idea what it could be?
I would really appreciate your help. Thank you.
UPDATE:
This is it... Could it be something in the plist...?
I finally got to the bottom of this problem thanks to "OC Rickard". Writing 'bt' in the console, this was the output:
thread #1: tid = 0x2503, 0x38a8b454 CoreFoundationCFDictionaryRemoveValue + 12, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x38a8b454 CoreFoundationCFDictionaryRemoveValue + 12
frame #1: 0x36e58e28 GraphicsServicesRemoveFont + 740
frame #2: 0x36e58868 GraphicsServicesAddFontsFromCGFontAndPath + 332
frame #3: 0x36e58660 GraphicsServicesAddFontsFromURLOrPath + 156
frame #4: 0x36e59e12 GraphicsServicesInitialize_block_invoke_0 + 378
frame #5: 0x36e3a4b6 libdispatch.dylib_dispatch_client_callout + 22
frame #6: 0x36e403f6 libdispatch.dylibdispatch_once_f$VARIANT$mp + 42
frame #7: 0x36e57f7a GraphicsServicesInitialize + 78
frame #8: 0x36e57fc0 GraphicsServicesGSFontCreateWithName + 56
frame #9: 0x31c7cfea UIKitUINewFont + 58
frame #10: 0x31c7cf9a UIKit+[UIFont systemFontOfSize:traits:] + 18
frame #11: 0x31fa608c UIKit-[UIStatusBarServiceItemView _contentsImageFromString:withWidth:letterSpacing:forStyle:] + 124
frame #12: 0x31cd888a UIKit-[UIStatusBarServiceItemView _serviceContentsImageForStyle:] + 362
frame #13: 0x31cd84ac UIKit-[UIStatusBarServiceItemView updateContentsAndWidth] + 140
frame #14: 0x31cd823e UIKit-[UIStatusBarItemView initWithItem:data:actions:style:] + 306
frame #15: 0x31cd7f90 UIKit-[UIStatusBarLayoutManager _createViewForItem:withData:actions:] + 108
frame #16: 0x31c877de UIKit-[UIStatusBarLayoutManager _prepareEnabledItemType:withEnabledItems:withData:actions:itemAppearing:itemDisappearing:] + 134
frame #17: 0x31c8770e UIKit-[UIStatusBarLayoutManager prepareEnabledItems:withData:actions:] + 82
frame #18: 0x31f9e910 UIKit-[UIStatusBarForegroundView _setStatusBarData:actions:animated:] + 168
frame #19: 0x31c87662 UIKit-[UIStatusBarForegroundView setStatusBarData:actions:animated:] + 722
frame #20: 0x31cd7516 UIKit-[UIStatusBar _prepareToSetStyle:animation:] + 794
frame #21: 0x31c8978e UIKit-[UIStatusBar requestStyle:animationParameters:] + 558
frame #22: 0x31c894a8 UIKit-[UIStatusBar requestStyle:animated:] + 84
frame #23: 0x31cd2f6e UIKit-[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:] + 258
frame #24: 0x31cd2736 UIKit-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 430
frame #25: 0x31c7ac38 UIKit-[UIApplication handleEvent:withNewEvent:] + 1004
frame #26: 0x31c7a6cc UIKit-[UIApplication sendEvent:] + 72
frame #27: 0x31c7a11a UIKit_UIApplicationHandleEvent + 6154
frame #28: 0x36e5d5a2 GraphicsServices_PurpleEventCallback + 590
frame #29: 0x36e5d1d2 GraphicsServicesPurpleEventCallback + 34
frame #30: 0x38b1d172 CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 34
frame #31: 0x38b1d116 CoreFoundation__CFRunLoopDoSource1 + 138
frame #32: 0x38b1bf98 CoreFoundation__CFRunLoopRun + 1384
frame #33: 0x38a8eebc CoreFoundationCFRunLoopRunSpecific + 356
frame #34: 0x38a8ed48 CoreFoundationCFRunLoopRunInMode + 104
frame #35: 0x31cd147c UIKit-[UIApplication _run] + 668
frame #36: 0x31cce2f8 UIKitUIApplicationMain + 1120
frame #37: 0x00085f96 iSpyLovemain(argc=1, argv=0x2fd98d20) + 110 at main.m:16
frame #38: 0x362fab20 libdyld.dylibstart + 4
I had a font declared in the plist file which had .dfont extension. Apparently iOS 6 didn't like this. Thank you "OC Rickard", and thanks to all of you guys for taking interest in my problem.
I am trying to integrate RevMobAds into my iOS application. It is crashing on the very first line,
[RevMobAds startSessionWithAppID:#"myAppID"];
How to solve this issue? I followed the instructions given here: http://sdk.revmob.com/ios.html. I am using the SDK 5.6.0. Please let me know. The following is the crash log.
* thread #1: tid = 0x1f03, 0x029c109f libobjc.A.dylib`objc_msgSend + 19, stop reason = EXC_BAD_ACCESS (code=2, address=0x0)
frame #0: 0x029c109f libobjc.A.dylib`objc_msgSend + 19
frame #1: 0x029acb2e libobjc.A.dylib`objc_setProperty_non_gc + 62
frame #2: 0x029acd0d libobjc.A.dylib`objc_setProperty + 47
frame #3: 0x0016cbb6 MyApp`-[RevMobHttpClient setOnSuccess:] + 63 at RevMobHttpClient.h:9
frame #4: 0x0016c621 MyApp`-[RevMobHttpClient post:toUrl:onSuccess:onFailure:] + 56 at RevMobHttpClient.m:112
frame #5: 0x0016be43 MyApp`+[RevMobHttpClient post:toUrl:onSuccess:onFailure:] + 195 at RevMobHttpClient.m:45
frame #6: 0x001645d4 MyApp`-[RevMobSessionStarter start] + 203 at RevMobSessionStarter.m:42
frame #7: 0x00161bfb MyApp`+[RevMobSessionManager startSessionWithAppID:delegate:testingMode:sdkName:sdkVersion:] + 467 at RevMobSessionManager.m:145
frame #8: 0x0015ce99 MyApp`+[RevMobAds startSessionWithAppID:delegate:testingMode:sdkName:sdkVersion:] + 145 at RevMobAds.m:111
frame #9: 0x0015cf08 MyApp`+[RevMobAds startSessionWithAppID:] + 75 at RevMobAds.m:126
frame #10: 0x00002b5f MyApp`-[MyAppAppDelegate application:didFinishLaunchingWithOptions:] + 111 at MyAppAppDelegate.m:26
frame #11: 0x00b3f7b7 UIKit`-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 266
frame #12: 0x00b3fda7 UIKit`-[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1248
frame #13: 0x00b40fab UIKit`-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 805
frame #14: 0x00b52315 UIKit`-[UIApplication handleEvent:withNewEvent:] + 1022
frame #15: 0x00b5324b UIKit`-[UIApplication sendEvent:] + 85
frame #16: 0x00b44cf8 UIKit`_UIApplicationHandleEvent + 9874
frame #17: 0x02eb8df9 GraphicsServices`_PurpleEventCallback + 339
frame #18: 0x02eb8ad0 GraphicsServices`PurpleEventCallback + 46
frame #19: 0x02efdbf5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
frame #20: 0x02efd962 CoreFoundation`__CFRunLoopDoSource1 + 146
frame #21: 0x02f2ebb6 CoreFoundation`__CFRunLoopRun + 2118
frame #22: 0x02f2df44 CoreFoundation`CFRunLoopRunSpecific + 276
frame #23: 0x02f2de1b CoreFoundation`CFRunLoopRunInMode + 123
frame #24: 0x00b407da UIKit`-[UIApplication _run] + 774
frame #25: 0x00b4265c UIKit`UIApplicationMain + 1211
frame #26: 0x00002abd MyApp`main + 125 at main.m:14
Thanks.
I am not sure the exact issue. The project in which I tried integrate the SDK was created in an older version of SDK. I created new project in new Xcode, integrated the SDK and it worked fine. Thank you everyone.
I'm working on a universal app and the iPhone version works just fine. I created a new nib for iPad and set the files owner to be the viewcontroller class. The I connected all the IBOutlets and IBActions. When I run the app on an iPad (and in the iPad simulator) it crashes when I touch any of the controls. I tried setting break points in the IBActions for each but it doesn't even make it to those before the crash happens. What's going on?
Backtrace:
* thread #1: tid = 0x1f03, 0x0189809b libobjc.A.dylibobjc_msgSend + 15, stop reason = EXC_BAD_ACCESS (code=2, address=0x15)
frame #0: 0x0189809b libobjc.A.dylibobjc_msgSend + 15
frame #1: 0x0020f14e UIKit-[UIApplication sendAction:to:from:forEvent:] + 96
frame #2: 0x0020f0e6 UIKit-[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
frame #3: 0x002b5ade UIKit-[UIControl sendAction:to:forEvent:] + 66
frame #4: 0x002b5fa7 UIKit-[UIControl(Internal) _sendActionsForEvents:withEvent:] + 503
frame #5: 0x002b5b13 UIKit-[UIControl sendActionsForControlEvents:] + 48
frame #6: 0x00304462 UIKit-[UISegmentedControl _setSelectedSegmentIndex:notify:] + 684
frame #7: 0x00305dd0 UIKit-[UISegmentedControl touchesBegan:withEvent:] + 1026
frame #8: 0x002342cf UIKit-[UIWindow sendTouchesForEvent:] + 272
frame #9: 0x002345e6 UIKit-[UIWindow sendEvent:] + 273
frame #10: 0x0021adc4 UIKit-[UIApplication sendEvent:] + 464
frame #11: 0x0020e634 UIKit_UIApplicationHandleEvent + 8196
frame #12: 0x021c0ef5 GraphicsServicesPurpleEventCallback + 1274
frame #13: 0x012a1195 CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
frame #14: 0x01205ff2 CoreFoundation_CFRunLoopDoSource1 + 146
frame #15: 0x012048da CoreFoundation__CFRunLoopRun + 2218
frame #16: 0x01203d84 CoreFoundationCFRunLoopRunSpecific + 212
frame #17: 0x01203c9b CoreFoundationCFRunLoopRunInMode + 123
frame #18: 0x021bf7d8 GraphicsServicesGSEventRunModal + 190
frame #19: 0x021bf88a GraphicsServicesGSEventRun + 103
frame #20: 0x0020c626 UIKitUIApplicationMain + 1163
frame #21: 0x00001d8d gravity`main + 141 at main.m:16
Turns out the view controller wasn't being retained due to ARC. So when I went back to send messages to it it crashed.