I can't load my MainMenu.nib file to my application in XCode. The console log reveals nothing and I'm hoping my .nib file is not corrupted somehow. Please Help!
3/2/12 10:39:29.134 PM Xcode: Exception raised while
decoding document objects -
*** -[__NSArrayM insertObject:atIndex:]:
object cannot be nil
It has happened for me, too, after upgrading to Xcode 4.3 some of my .nibs refuse to open.
I filed a bug to Apple a couple of days ago, but still no answer.
Upgraded just now to Xcode 4.3.1, the problems are still there:
The document "***.nib" could not be opened. The operation couldn’t be completed. *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil.
As a last resort I'll try to downgrade to Xcode 4.2.
I have tried to open these nibs in a text editor (they are just xml, after all) and they open regularly. They appears intact and healthy. The problem is all in Xcode and it is over my possibilities.
Paolo
Have you tried deleting the ViewController of the nib file together with the nib file and recreate them? There's a couple of way to go around it. Had the same issue and recreated my ViewController without nib file. Then add the content programmatically. Taxing but with more control and flexibility.
Downgrading to 4.2 will prohibit chances to test your app on your device running 5.0.1 (if you have upgraded those devices.
Related
encountering a very frustrating issue. I have a Xib file for my custom UITableViewCell. I set the constraints up and there are no warning or issues and the app runs fine. However if I close the Xcode and reopen it they are set to different values and the entire view is broken.
There seems to be no way to fix this, even if I reset to a previous commit the view remains broken. Has anyone else encountered this? Is there a fix?
Please try Xcode 8.1 which addresses the following:
Xcode 8.0 did not always restore view frames from storyboards and xibs when layouts were ambiguous. Xcode 8.1 fixes several of these issues. If you have encountered these issues, resolve the ambiguity in the Auto Layout issues and update frames. Xcode 8.1 will persist them correctly. (28221021, 28244619)
(If not, please file a bug with http://bugreport.apple.com.)
I'm experiencing a very strange error: my Xcode is freezing when I quit a certain storyboard of a certain project.
When i open Xcode, the xib shows up normally, I can even edit it and save it. But when I'm trying to open another file, any other file, it freezes forever.
I tried to delete every temporary files as described here, or here, or here, but the problem still remains. Ah, and... re-create my xib is obviously not an option...
Any other idea?
EDIT:
When I delete myProject/[project.xcworkspace/]xcuserdata (s), I can navigate in my project as usual while I don't open the storyboard. otherwise my problem comes again.
Since my post about this problem, I saw it on other projects. I'm pretty sure this was linked to custom fonts in xib, because it often happened after an Xcode bug rendering custom fonts.
Few days ago I downloaded the last Xcode version, 6.3.2, and the problem did not bother me again. So it seems to be resolved.
I just downloaded a project from a git repository on two different Macbooks. On the first, it runs without problem.
On the second Macbook shows me the following message:
Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool
failed with exit code 255
When trying to compile the file MainStoryboard.storyboard.
When I click the MainStoryboard.storyboard on XCode, it crashes and doesn't open it.
On the other computer, everything works fine.
I tried the following things to fix this problem, without success:
1) Upgraded XCode from 4.5 to 4.5.2
2) Removed the project directory and cloned the repository again.
3) Deleted the contents of my project on ~/Library/Developer/Xcode/DerivedData
4) purge
Any ideas on how to fix this problem?
Found this issue using XCode 5.
I've solved the issue, but it required a hard reset.
Some said it was because I installed XCode outside of the App Store, or because the simluator was buggy, or because XCode was pointing at the wrong version of the Simulator, or a resoruce was missing a target membership, or whatever. I tried all of that.
I downloaded XCode from the App Store, re-installed the Simulators, and still no luck. So I just rolled back my repository to an earlier date, and lost some work in the process. Not much though, because I always commit little and often.
Since ever starting to use storyboards back in 2011, I have always committed little AND OFTEN. Storyboards are fragile.
EDIT
After adding the new components back in, the problem re-surfaced.
I noticed that I put a static table view, within a UIViewController. I was doing this before.
I was using a subclass of UITableViewController in code, but the storyboard scene, was a UIViewController. I dragged out a UITableViewController instead, and moved the table view cells into that, and it solved the issue.
All thanks to missing error messages. Where have they all gone since XCode 5?
Do a
which ibtool
At the command line on both Macs. Chances are they are different.
Before Xcode was bundled in a single .app bundle it would install command line tools in folders like /usr/local.
I would recommend you remove those local copies to avoid interference with Xcode's built in version, i.e. that it uses the old version. If you still want to be able to use ibtool from the command line, here's an explanation about xcrun: http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/
Almost half year later I finally succeeded to discover what was causing this problem and fixed the bug.
Now, with XCode 4.6.3 it gives me another clue about the problem:
2013-06-28 18:15:32.606 Interface Builder Cocoa Touch Tool[7894:f07] CFPreferences: user home directory at file://localhost/Users/[myusername]/Library/Application%20Support/iPhone%20Simulator/User/ is unavailable. User domains will be volatile.Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255
After receiving this new message, I searched for this User folder inside "iPhone Simulator" and there were no folder named "User".
I created the "User" folder, did a clean and after this I was able to build the project again!
the fix for me in Xcode 6.4 was to ... restart my computer. sad, but true.
I was getting the same error. It turned out I had miswired some of the outlets in the tableview cell.
I don't know if someone is still struggling with this error but today was my turn to confront it. I just solved it. This is the context:
I had a UITableViewCell with half of it cover by a simple UIVIEW. Inside this UIVIEW i had many other view (UILables, UITextField, etc etc)
Just where the UIVIEW ended (Again it covered the middle of the entire UITableViewCell) i placed an UIImageView. Half of the UIImageView covered the UIView and the other half was on the UITableView itself. In the Hierarchy the UIImageView was on the UITableVIewCell and not inside the UIView.
The problem was when i was applying autolayout i put a constraint between a view inside the UIView and the UIImageView that was outside of the UIVIEW.
When i run the app, the error came up. After half an hour deleting views and stuff i realized that the error was caused by that constraint. After deleting that constraint, the error was gone.
So bottom line, check your constraints! only "Connect" views with others that are inside the same superView.
Good luck!
Try completely reinstalling Xcode. Seems like there's something wrong with ibtool that a reinstall is probably able to fix.
I have a crash log for my app sent to me by a tester. According to the documentation I should be able to drop this into the 'Device Logs' section of the Library in the Organizer (or use the 'Import' button at the bottom of the window).
Unfortunately both does nothing. No error, no warning, no import.
My .crash file was created by hand by copying the content of an email so maybe the formatting is incorrect, comparing it to other crash files it seems correct though.
I have the build the crash log refers to in my archive also, as I know this is important for symbols to show up.
Any idea how I can debug this? This is using Xcode 4.4.1
I experienced the same issue when I tried to import crash logs generated by PLCrashReporter. Then I noticed that Incident identifier and CrashReporter key fields in the crash reports are populated with "[TODO]" string instead of correct values. I replaced incident identifiers with arbitrary UUIDs and crash reporter key with UDID of one of my devices, and after that XCode was able to import the reports. I use XCode 4.5
I broke down and used one of my support credits with Apple to try and get to the bottom of this.
The bottom line is quite simple. As of now (Xcode 4.6), OS X crash logs cannot be imported into Xcode. Only iOS ones.
I suspect an Xcode bug.
I have the same problem with Xcode 4.4.1. Even tried the latest 4.5.2 developer release.
I used an earlier version of Xcode, and it kinda worked (only importing one crash at a time, required to relaunch Xcode several times, but I managed to do what I needed).
You can download an older version of Xcode here.
I had some success with deleting ~/Library/Developer/Xcode/iOS Device Logs when Xcode refused to cooperate. Proceed at your own risk.
Every time I open my app in Xcode 4.4 it crashes. It never used to do this in Lion and being very close to submission after about 6 months of work, I'm pretty annoyed to say the least!
This is part of the crash report if it helps; I can't make head nor tail of it. If anybody can help me, I'd be forever in your debt.
UNCAUGHT EXCEPTION (NSBadBitmapParametersException): Overflow allocating bitmap backing store. Cannot back bitmap with 1152921504606846976 bytes per row, -9223372036854775808 height, and 1 planes.
Um, have had that issue what I did Is delated xcode and redownloaded it.
Hope that works!
Experiencing such kind of problems, I got the following conclusion: 3 files can be corrupted
Your project file, in that case try using time machine to get the
one which will work
The XCode prefs: /Users/xample/Library/Preferences/com.apple.dt.Xcode.plist
Your project's Derived data ~/Library/Developer/Xcode/DerivedData
If one of those is corrupted, it will corrupt the 2 other one. To recover a project, start trashing the pref and derived data, then try to open your project. Reinstalling XCode did not solved my problem, using the DP4.5 neither in my case.
HOWEVER: Installing the latest "Command Line Tools for Xcode solved it (and this is probably the first thing to try)
Sounds weird but Xcode 4.4 has problem with printing out logs of big strings.
I had the same problem, and I deleted an NSLog which printed a big amount of text, and the crash stopped...
For me, I'm getting this crash when trying to open a particular .storyboard file from the project view. If I open the file directly through finder, it doesn't immediately crash so long as the window is small. If I try to resize it or scroll one of the views into view, it will crash again.
I faced same issue with XCode 4.5.1. It keep crashing whenever i open storyboard and it throws following error:
Application Specific Information:
ProductBuildVersion: 4G1004
UNCAUGHT EXCEPTION (NSBadBitmapParametersException): Overflow allocating bitmap backing store. Cannot back bitmap with 1152921504606846976 bytes per row, -9223372036854775808 height, and 1 planes.
Apple released new developer preview version of XCode 4.5.2 last week, which has fix for all intermediate crashes that we saw in previous versions. This build is available in https://developer.apple.com/devcenter/ios/index.action
You can try this.
This is going to Apple as a bug report I'm afraid; they said from the crash report that it looks like a bug. Thanks to everyone for their help.