Xcode Storyboard crash - xcode

Whenever I add an object (specifically a UIButton or UILabel) to my Storyboard view, Xcode crashes. I've tried rebooting and reinstalling Xcode. I've also tried to recreate my view in a new project. It doesn't crash at first, but it does once I add a few more buttons to the Storyboard.
When I right click on MainStoryboard.storyboard in the Navigator and select "Open As: Property List", I get an error: "The data couldn't be read because it has been corrupted." In fact, this error appears when I try to open my .h and .m files in the same manner.
I'm running the newest version of Xcode (4.5) on Mountain Lion. Below is part of a crash log. Please let me know if I need to include more of it.
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 arbitrate IBNSLayoutConstraint, IBUIButton, IBUILabel, 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:
Reason: All views needing candidate constraints have already had constraints generated. This most likely indicates a bug involving layout of the following views:
Layout engine frame ({{169, 392}, {64, 43}}) of > does not match canvas frame ({{168, 392}, {64, 43}})
UPDATE:
Apparently I didn't research well enough. I found someone with the exact same problem:
Xcode Interface Builder crashes when I edit storyboard
Right click on Storyboard in the navigator -> Show File Inspector -> Uncheck "Use Autolayout"
Problem solved!

Related

Xcode Error: Could not instantiate class named _UIScrollViewLayoutGuide

I am running my Xcode project (Xcode 11) on an iPhone 4S running iOS 9 and I am getting the following error:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIScrollViewLayoutGuide'
I have tried looking up solutions to this error but could not find any. My code has installed all constraints and am suspecting it is because I am using the Interface Builder to create the scroll view.
What is odd is that other scroll views in the app are working fine, but this one keeps giving me this error… Any way to solve it?
It seems that I have found an answer! I am unsure why Xcode did not flag the error in the first place. With the new Xcode support for iOS 13, ScrollView Content Layout Guides are automatically enabled. In iOS versions below iOS 11, there is no Content Layout Guide attribute.
I disabled the Content Layout Guides by selecting the Scroll View, going to the Size Inspector and deselecting 'Content Layout Guides' at the bottom of the first section.
This fixed my issue!

Xcode keeps crashing

I just started out programming for iOS. I tried adding an enter button for a simple calculator and changing its size, but Xcode keeps crashing. This is the report:
Process: Xcode [406]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 4.5.1 (1842)
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4G1004
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-1929/IBPlugin/Utilities/IBObjectMarshalling.m:651
Details: Failed to arbitrate IBNSLayoutConstraint, IBUIButton, IBUILabel, 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:
Reason: All views needing candidate constraints have already had constraints generated. This most likely indicates a bug involving layout of the following views:
Layout engine frame ({{20, 20}, {282, 36}}) of <UILabel: 0x81f5560; frame = (20 20; 281 36); text = '0'; clipsToBounds = YES; opaque = NO; autoresize = TM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x815cdd0>> does not match canvas frame ({{20, 20}, {281, 36}})
I've already tried reinstalling Xcode and resetting iOS simulator as well. I have Mountain Lion.
Try this steps:
1) Right click on Storyboard in the navigator
2) Click on Show File Inspector
3) Uncheck "Use Autolayout"
Hope this helps

Could not instantiate class named UIRefreshControl Xcode

I am building a RSS feed on a tableview. When i run the app, on my iPhone could run smoothly while in ipad, it crashed and showed "Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIRefreshControl'"
I tried to run the app on my ipad simulator, it also could run smoothly. May I know what is the problem for that?
Thanks
UIRefreshControl only exists on iOS 6. So if your iPad is running 5.1.1, you won't be able to use UIRefreshControl, because UIRefreshControl did not exist in iOS 5.1.1. So when the nib decoding happens, the decoder finds "UIRefreshControl", it doesn't know what to do with it, and it crashes.
In your storyboard, click on the tableview and go to the Attribute Inspector. Under the section "TableView Controller" there is a selection window for "Refreshing" that can be set to disabled. When I built for my iPad-1, running iOS 5.1 I got an empty tableView instead of the error, 'Could not instantiate class named UIRefreshControl'. This was to be expected since I haven't populated the device with files to select, yet.

can't open Interface Builder when updated to mac os x 10.7.3

I updated my macbook to mac os x 10.7.3(11D50b).Then when I build my project under Xcode3.2.5,
errors occurred:
/Volumes/DATA/Work/Untitled/MainWindow.xib:0:0 ibtool failed with exception: Interface Builder encountered an error communicating with the iPhone 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.
The Interface Builder app can't be opened too.Maybe Apple didn't support IB any more? How can I solve this problem?
OK, the error was gone yesterday. Maybe reboot the computer can solve this problem.

Interface builder is crashing upon startup

I downloaded xcode 3.2 and the iphone sdk 4.1, which has been working wonderfully, until a few days ago. For some reason whenever I open interface builder by clicking on a xib file all the pictures in the buttons and imageviews display a big blue question mark, and then interface builder gives me this:
Assertion Message: An uncaught exception was raised.
Exception Name: NSInvalidArgumentException
Reason: * -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: ../goldnquartz.jpg)
User Info: (null)
And asks if I want to crash or continue. If I continue, I cannot do anything useful in IB. I also made a new blank .xib file and tried to open that file with IB, but I got the same message.
How do I fix this?
I had the same problem today. It was a broken image file.

Resources