Xcode 5 Crashes -- Xcode Quit Unexpectedly

Xcode quits unexpectedly every time I open my project

Xcode stores some user state information inside the Xcode project “file”, which is really a folder. That state information might have become corrupted. You can normally throw away everything inside your .xcodeproj folder except the project.pbxproj file. This might fix your problem.

Open up the folder containing your .xcodeproj file. Right-click or control-click the .xcodeproj file and choose “Show Package Contents”. Then throw away everything except the project.pbxproj file.

cleaning an xcodeproj package

If you know what an Xcode workspace is, and you're actually making use of it, you might not have a project.xcworkspace file to throw away, or you might not want to throw it away. But if you don't know what an Xcode workspace is, then you're not using it so you can just throw away project.xcworkspace. Xcode will recreate it automatically.

Xcode Error Report Xcode quit unexpectedly

It seems that Xcode cannot restore the tabs / files you have opened the last time see Method: -_restoreSelectedTabsByIdentifierFromStateSaving:.

The latest ui state including opened files, curent target etc. is stored in the UserInterfaceState.xcusertate. You can find the file in your Xcode project folder under:

/<your_project_path>/<your_project_name>.xcodeproj/project.xcworkspace/xcuserdata/<username>.xcuserdatad/UserInterfaceState.xcuserstate

Just remove the file e.g. via rm and Xcode shall work again.

Xcode crashes on launch

Delete ~/Library/Developer/Xcode/DerivedData by running this command in terminal:

rm -r ~/Library/Developer/XCode/DerivedData

If that doesnt work, At this point and with given info, all I could recommend to delete and reinstall Xcode.

Xcode 5 crashes when running an app with SDL 2

It looks like the problem is that SDL2 isn't properly signed. There's a ticket to fix the issue at https://bugzilla.libsdl.org/show_bug.cgi?id=2058.

When you spawn an application from Xcode 5 with lldb, Xcode loads a plugin that will inspect modules your application loads, presumably to give you insight into your program. Xcode is set up to crash if it reads from a page that is backed by an invalid signature. Because SDL2 isn't properly signed, when Xcode 5 attempts to examine the SDL2 library, it will read from an invalid page, and crash. You get a clue that this is happening by the following line in your crash report above:

Exception Type:  EXC_BAD_ACCESS (Code Signature Invalid)

To see for yourself that SDL isn't properly signed, execute the following command from the folder where SDL2 resides:

$ codesign -vvvv SDL2 
SDL2: invalid signature (code or signature have been modified)
In architecture: x86_64

If you don't want to build your own version of SDL2 (the solution that's mentioned above), you can update the signature to make it correct:

$ codesign -f -s - SDL2 
SDL2: replacing existing signature

And to verify that the new signature is good:

$ codesign -vvvv SDL2
SDL2: valid on disk
SDL2: satisfies its Designated Requirement

Note that doing this as a workaround is risky from a security standpoint, as I'm not sure why the signature is invalid.



Related Topics



Leave a reply



Submit