Very often when I try to edit UILabels in storyboard, Xcode is crashing. Any ideas what could be causing this? It looks like it has something to do with one of the autolayout constraints. Here's the error report:
Process: Xcode [43938]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 4.5 (1839)
Build Info: IDEApplication-1839000000000000~3
App Item ID: 497799835
App External ID: 10747437
Code Type: X86-64 (Native)
Parent Process: launchd [43283]
Date/Time: 2012-10-01 09:43:36.443 -0400
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Sleep/Wake UUID: 8C7C93A7-0BEF-42C6-944C-488D8C7896DD
Interval Since Last Report: 152594 sec
Crashes Since Last Report: 6
Per-App Interval Since Last Report: 135715 sec
Per-App Crashes Since Last Report: 5
Anonymous UUID: E745D8FE-362B-4FD2-8594-7EC5C26767B2
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4G182
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-1926/IBPlugin/Utilities/IBObjectMarshalling.m:651
Details: Failed to start deciding frames for IBNSLayoutConstraint, IBUILabel, IBUITabBarItem, IBUITableView, IBUIView, and IBUIViewController.
Interface Builder encountered an error communicating with the iOS Simulator. If you choose to file a crash report or radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.
Exception name: IBAssertionFailure
Exception reason: ASSERTION FAILURE: realConstraint
Reason: Should have found real constraint for represented constraint <NSLayoutConstraint:0x86a8c30 H:[UIView:0x868a0f0(71)]>
File: /SourceCache/IBAutolayoutFoundationIOS/IBAutolayoutFoundation-1818/Framework/Classes/Arbitration/IBAutolayoutEngine.m:223
Method: __76-[IBAutolayoutEngine realConstraintsFromCollectionOfRepresentedConstraints:]_block_invoke_0
Exception backtrace:
0. CoreFoundation 0x022a4012 __exceptionPreprocess
1. libobjc.A.dylib 0x01703e7e objc_exception_throw
2. CoreFoundation 0x0232cfb1 -[NSException raise]
3. ??? 0x0000beae [IBCocoaTouchTool startAutolayoutFrameDecisionSessionWithRequest:document:]
4. ??? 0x000342a5 [IBMessageReceiveChannel deliverMessage:toTarget:withArguments:result:]
5. ??? 0x00033fa9 [IBMessageReceiveChannel deliverMessage:toTarget:withArguments:result:]
6. ??? 0x00033c47 [IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:]
7. libdispatch.dylib 0x04c3d731 _dispatch_barrier_sync_f_slow_invoke
8. libdispatch.dylib 0x04c4c014 _dispatch_client_callout
9. libdispatch.dylib 0x04c3c7d5 _dispatch_main_queue_callback_4CF
10. CoreFoundation 0x0224aaf5 __CFRunLoopRun
11. CoreFoundation 0x02249f44 CFRunLoopRunSpecific
12. CoreFoundation 0x02249e1b CFRunLoopRunInMode
13. Foundation 0x01308c7c -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
14. ??? 0x0000cf06 [IBCocoaTouchTool startServingReceiveChannel:]
15. ??? 0x0000d09f [IBCocoaTouchTool startServingWithSocket:]
16. ??? 0x0000e1b7 [IBCocoaTouchTool .cxx_destruct]
17. ??? 0x00002365 ???
Exception info:{
}
I have the same problem… when working in a storyboard with "Rounded Rect Buttons" it crashes. Sometimes with one or two buttons, sometimes I can add ten buttons and then it crashes.
Edit:
After some experiments I have unchecked "Use Autolayout" in the "File Inspector" of the Storyboard and it works.
Maybe you'll give it a try.
A work around is to cut & paste from a Storyboard to the .xib.
* For me, it crashes in IB with .xib when ContainerView is dragged to the canvas. Xcode Version 8.2.1.
Related
My Objective-C application is using a 3rd party VoIP SDK. I found the application crashes if left running overnight. The crash only happens if I enable the SDK, so I strongly suspect it causes the crash.
The library is a static library (.a extension). I tried catching the exception using try-catch block, and NSSetUncaughtExceptionHandler, but it didn't work. I suspect those methods only work with Objective-C exceptions, and the SDK is written in native C?
Is it possible to catch a 3rd party native C exception? I'm fine with any kind of hacks, since this will not be going into production code. Just trying to get to the bottom of the issue.
EDIT:
Here's the crash log:
Hardware Model: iPad5,1
Version: 0.14 (6.0)
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2016-11-22 08:24:59.7336 -0500
Launch Time: 2016-11-21 13:45:09.9956 -0500
OS Version: iPhone OS 10.1.1 (14B100)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
(0x18953e1c0 0x187f7855c 0x18953e108 0x18f89359c 0x18f6f4444 0x18f4c653c
0x18f391d48 0x18f391c78 0x18f44bb10 0x18f44aec0 0x18f44a90c 0x18f44a4c0
0x18f44a424 0x18f38f220 0x18c84f188 0x18c843e64 0x18c843d24 0x18c7c07ec
0x18c7e7c58 0x18c7e8678 0x1894eb7dc 0x1894e940c 0x1894e989c 0x189418048
0x18ae9e198 0x18f3fd2fc 0x18f3f8034 0x10002304c 0x1883fc5b8)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000018850e014 0x1884ef000 + 126996
1 libsystem_pthread.dylib 0x00000001885d6450 0x1885d1000 + 21584
2 libsystem_c.dylib 0x00000001884823e0 0x18841f000 + 406496
3 libc++abi.dylib 0x0000000187f4d2d4 0x187f4c000 + 4820
4 libc++abi.dylib 0x0000000187f6acc0 0x187f4c000 + 126144
5 libobjc.A.dylib 0x0000000187f78844 0x187f70000 + 34884
6 libc++abi.dylib 0x0000000187f6766c 0x187f4c000 + 112236
7 libc++abi.dylib 0x0000000187f67234 0x187f4c000 + 111156
8 libobjc.A.dylib 0x0000000187f7871c 0x187f70000 + 34588
9 CoreFoundation 0x00000001894180bc 0x18940f000 + 37052
10 GraphicsServices 0x000000018ae9e198 0x18ae92000 + 49560
11 UIKit 0x000000018f3fd2fc 0x18f382000 + 504572
12 UIKit 0x000000018f3f8034 0x18f382000 + 483380
13 Remote 0x000000010002304c 0x100008000 + 110668
14 libdyld.dylib 0x00000001883fc5b8 0x1883f8000 + 17848
That isn't a catchable exception, that is a hard crash. And, specifically, it is a purposeful crash; something on the main thread decided things had gone badly enough that it called abort().
So, no, nothing you can do to catch it and it isn't even clear that the crash is triggered by the 3rd party library, given that crash log.
I need to localize my plist files and string files for my project. However, when I try to select other languages in file inspector for .plist files, the Xcode will crash.
Parent Process: ??? [1]
Responsible: Xcode [1981]
User ID: 501
Date/Time: 2015-09-24 11:47:52.069 +1000
OS Version: Mac OS X 10.10.4 (14E46)
Report Version: 11
Anonymous UUID: XXXXXXXXXXX
Time Awake Since Boot: 7500 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 7A220
UNCAUGHT EXCEPTION (NSInvalidArgumentException): *** -[NSPathStore2 stringByAppendingPathExtension:]: nil argument
UserInfo: (null)
Hints: None
Backtrace:
0 0x00007fff89f71024 __exceptionPreprocess (in CoreFoundation)
1 0x0000000102627744 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 0x00007fff87bc376e objc_exception_throw (in libobjc.A.dylib)
3 0x00007fff89f70eed +[NSException raise:format:] (in CoreFoundation)
4 0x00007fff90f257e3 -[NSPathStore2 stringByAppendingPathExtension:] (in Foundation)
5 0x000000010c5ae87c -[Xcode3VariantGroup proposedFilePathForLocalization:fileType:] (in DevToolsCore)
6 0x000000011281dc8c -[Xcode3LocalizationCommands
Anyone has same issue with Xcode7??
PS: localizing .string file works fine with same approach.
Having the same issue. Xcode 7.1 beta 2 seems to have it fixed.
I'm testing Apple Pay and trying to make a sample purchase, however when I'm in simulator in the XCode 7.0 and 7.1, there is an option of Pay with Passcode and it kept crashing simulator after you tap that..
Any ideas?
Process: PassbookUIService [10809]
Path: /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications/PassbookUIService.app/PassbookUIService
Identifier: PassbookUIService
Version: 1.0 (1.0)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [10692]
Responsible: launchd_sim [10692]
User ID: 501
Date/Time: 2015-09-11 17:08:10.953 +0100
OS Version: Mac OS X 10.10.5 (14F27)
Report Version: 11
Anonymous UUID: ECB58F9C-C22D-6885-D23E-251989A674E0
Sleep/Wake UUID: A0D81423-EF8E-48CF-9C81-E81BF0FCF129
Time Awake Since Boot: 19000 seconds
Time Since Wake: 6600 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderSet initWithObjects:count:]: attempt to insert nil object from objects[0]'
terminating with uncaught exception of type NSException
abort() called
CoreSimulator 182.4 - Device: iPhone 6s - Runtime: iOS 9.1 (13B5110e) - DeviceType: iPhone 6s
Application Specific Backtrace 1:
0 CoreFoundation 0x00000001103b6f65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000110743deb objc_exception_throw + 48
2 CoreFoundation 0x0000000110287cfe -[__NSPlaceholderSet initWithObjects:count:] + 334
3 CoreFoundation 0x00000001102f7f9f +[NSSet setWithObject:] + 47
4 PassKit 0x000000010ea6c47c -[PKPaymentOptionsDefaults setDefaultBillingAddress:forPaymentPass:] + 585
5 PassKit 0x000000010eaf1bd9 -[PKPaymentAuthorizationServiceViewController _didAuthorizePaymentWithToken:] + 233
6 UIKit 0x000000010edcb825 -[UIApplication sendAction:to:from:forEvent:] + 92
7 UIKit 0x000000010ef32c8e -[UIControl sendAction:to:forEvent:] + 67
By https://developer.apple.com/library/tvos/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc7_release_notes.html#//apple_ref/doc/uid/TP40001051-CH5-DontLinkElementID_135
And in "Known Issues"
Simulated transactions using Apple Pay in Simulator do not complete if requesting a user's billing address. (22551685)
We need to wait for the new version of Xcode, it would seem.
I have developed an iPad application using Xcode 6.3.2.
I submitted my application to the App Store for review where it was reject due to crash.Following is the crash report from iTunes.
Incident Identifier: 88DD7F94-3382-4241-A0D7-C3E7F6D20737
CrashReporter Key: 9881ae0cc3b3fbfccfd0ce1496d2fa08fec08782
Hardware Model: xxx
Path: /private/var/mobile/Containers/Bundle/Application/FDBBD67F-0EF7-43FB-80CB-8308A10A2D29/Vehicle Visuals.app/Vehicle Visuals
Identifier: com.vehiclevisuals.Vehicle-Visuals
Version: 2.0.0 (1.1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-06-12 12:33:57.988 -0700
Launch Time: 2015-06-12 12:22:14.581 -0700
OS Version: iOS 8.3 (12F69)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000195da7bdc 0x195d8c000 + 113628
1 QuartzCore 0x00000001889fdc2c 0x1889ec000 + 72748
2 Vehicle Visuals 0x0000000100126828 0x1000ec000 + 239656
3 Vehicle Visuals 0x0000000100101e80 0x1000ec000 + 89728
4 UIKit 0x0000000189118778 0x1890a4000 + 477048
5 UIKit 0x0000000189116750 0x1890a4000 + 468816
6 UIKit 0x0000000189112000 0x1890a4000 + 450560
7 UIKit 0x00000001890b175c 0x1890a4000 + 55132
8 QuartzCore 0x00000001889f9e18 0x1889ec000 + 56856
9 QuartzCore 0x00000001889f4880 0x1889ec000 + 34944
10 QuartzCore 0x00000001889f4724 0x1889ec000 + 34596
11 QuartzCore 0x00000001889f3eb8 0x1889ec000 + 32440
12 QuartzCore 0x00000001889f3c38 0x1889ec000 + 31800
13 UIKit 0x0000000189137f8c 0x1890a4000 + 606092
14 UIKit 0x0000000189137ef0 0x1890a4000 + 605936
15 CoreFoundation 0x000000018462c2a0 0x18454c000 + 918176
16 CoreFoundation 0x000000018462922c 0x18454c000 + 905772
17 CoreFoundation 0x000000018462955c 0x18454c000 + 906588
18 CoreFoundation 0x00000001845552d0 0x18454c000 + 37584
19 GraphicsServices 0x000000018dc436f8 0x18dc38000 + 46840
20 UIKit 0x000000018911afa8 0x1890a4000 + 487336
21 Vehicle Visuals 0x000000010013a1cc 0x1000ec000 + 319948
22 libdyld.dylib 0x0000000196412a04 0x196410000 + 10756
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
As per the report it crashes on OS Version : iOS 8.3 (12F69).
I tested my app on the all simulators(iPad Air, iPad 2, iPad Retina) with same config(iOS version 8.3 (12F69)) and also tested it on my device (iPad mini) with iOS version 8.3 (12F69), but didn't crashed on my side.
But it crashes on my friend's iPad Air with same iOS version (it gives the same crash report with different invalid address as below)
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype:
KERN_INVALID_ADDRESS at 0x0000000000000020 Triggered by Thread: 0
I don't have the iPad Air so that I could debug using the device.
I also tried to Symbolicated crash report using following command.
xcrun atos -o VehicleVisuals 0x0000000000000020
But it just gives me following hex code.
0x00000020 (in VehicleVisuals)
I following Link for symbolication.
I'm just not being able to recognise where actually is the crash issue.
Please can anybody help me out?
EXC_BAD_ACCESS usually happens because you are sending an Obj-C message to an invalid memory address, what means that you probably are trying to access some deallocated object.
It may be working on other devices because this object is not being released at the same time.
I recently had a similar crash that happened because there was a timer not being invalidated on dealloc, and when the target method was called, that object did no longer exist.
You could try to enable NSZombie objects and see if you find which object is being deallocated. In xCode 6, you can enable them in Product > Scheme > Edit scheme > Diagnostics > Enable Zombie Objects.
Also, there are lots of these kind of errors that NSZombieEnabled can't detect. Unfortunately there is nothing magical to solve it. The second option would be to run your app with instruments (memory leaks specifically) and see if you can get something. If this doesn't work you will have to review your code and check that there are no possibilities that you are trying to access a deallocated object. Hope it helps.
Good luck!
It was working fine when i was copying and paste uitableview cells inside interface builder. But on next day when i start Xcode it crashed with report,
Encountered an error communicating with Interface Builder Cocoa Touch Tool. If you choose to file a crash report or Radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.
Exception name: IBAssertionFailure
Exception reason: ASSERTION FAILURE: containingTableView
Reason: Any table view cell being added to a layout engine should be contained in a table view in order to get the correct metrics
I tried to empty cache by following link https://stackoverflow.com/a/6247073/1556386. I also tried to fresh reinstall Xcode 6.1.1 but nothing sort out the problem.
Exception details are,
Process: Xcode [3408]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.1.1 (6611)
Build Info: IDEFrameworks-6611000000000000~4
App Item ID: 497799835
App External ID: 810788292
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [3408]
User ID: 501
Date/Time: 2015-01-30 12:26:14.681 +0500
OS Version: Mac OS X 10.10 (14A389)
Report Version: 11
Anonymous UUID: 835265AB-3F12-806B-3EAE-821EB008717D
Time Awake Since Boot: 3800 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 6A2008a
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-6254/InterfaceBuilderKit/Utilities/IBAbstractMessageChannelInterfaceBuilderToolProxy.m:40
Details: Failed to compute auto layout status IBLayoutConstraint, IBUILabel, IBUITableViewCell, and IBUITableViewCellContentView.
Encountered an error communicating with Interface Builder Cocoa Touch Tool. If you choose to file a crash report or Radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.
Exception name: IBAssertionFailure
Exception reason: ASSERTION FAILURE: containingTableView
Reason: Any table view cell being added to a layout engine should be contained in a table view in order to get the correct metrics
File: /SourceCache/IBSimulatorComponents/IDEInterfaceBuilderCocoaTouch-6247/SimulatorComponents/IBCocoaTouchTool/WidgetIntegration/IBCTTUITableViewCellIntegration.m:227
Method: -[UITableViewCell(IBCocoaTouchToolIntegration) ibEffectiveViewToPlaceInLayoutEngineWindow]
Exception backtrace:
0. CoreFoundation 0x000000010a6baf1d __exceptionPreprocess
1. libobjc.A.dylib 0x00000001093a1bb7 objc_exception_throw
2. CoreFoundation 0x000000010a6bab79 -[NSException raise]
3. ??? 0x0000000106e94e73 [UITableViewCell ibEffectiveViewToPlaceInLayoutEngineWindow]
4. ??? 0x0000000106e9bc88 [UIView ibWindowForUpdatingConstraints:]
5. ??? 0x0000000106e909db [NSObject ibPlaceInWindowPositioningAndSizingIfNeeded:during:]
6. ??? 0x0000000106e9caae [UIView ibPlaceInWindowPositioningAndSizingIfNeeded:during:]
7. ??? 0x0000000106e7b697 [IBCocoaTouchToolArbitrationUnit _ensureRootObjectIsInWindowDuring:]
8. ??? 0x0000000106e7ba60 [IBCocoaTouchToolArbitrationUnit computeStatusFromEngine:]
9. IBAutolayoutFoundation 0x0000000108a4f82b -[IBAutolayoutArbitrationUnit computeStatus]
10. ??? 0x0000000106e797a5 [IBCocoaTouchTool computeAutolayoutStatusForRequest:document:]
11. IBFoundation 0x0000000108bc18ef __80-[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]_block_invoke
12. IBFoundation 0x0000000108bc1686 -[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]
13. IBFoundation 0x0000000108bc1350 __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke
14. libdispatch.dylib 0x000000010dcb6af4 _dispatch_client_callout
15. libdispatch.dylib 0x000000010dca3e95 _dispatch_barrier_sync_f_slow_invoke
16. libdispatch.dylib 0x000000010dcb6af4 _dispatch_client_callout
17. libdispatch.dylib 0x000000010dca2265 _dispatch_main_queue_callback_4CF
18. CoreFoundation 0x000000010a622fe9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
19. CoreFoundation 0x000000010a5e5eeb __CFRunLoopRun
20. CoreFoundation 0x000000010a5e5486 CFRunLoopRunSpecific
21. Foundation 0x0000000108f5eb42 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
22. IBFoundation 0x0000000108ba0955 -[IBAbstractPlatformTool startServingReceiveChannel:]
23. IBFoundation 0x0000000108ba0a2f -[IBAbstractPlatformTool startServingSocket:]
24. IBFoundation 0x0000000108ba0cf2 +[IBAbstractPlatformTool main]
25. ??? 0x0000000106eabe90 [IBViewRenderer .cxx_destruct]
26. libdyld.dylib 0x000000010dce7145 start
There was error in Storyboard file , i simply delete the Main.Storyboard file from Finder and than open Xcode. Xcode was than running normally.