Silex
Silex

Reputation: 2713

Cocoa Application quit unexpectedly

I wrote an Objective-C Cocoa application which can open some unique file types defined by myself. If I run my application from Xcode and drag and drop one of these unique files on my running application everything works fine, and it opens the file. If I run my built application and then I drag and drop any of these unique files on it, then it quits with the message that my app quit unexpectedly. Also if I double click on any of these unique files it tries to open it with my app, but then I get the same message that my app quit unexpectedly.

I have the application:openFile in my AppDelegate, I also don't do nothing in my applicationDidFinishLaunching.

Anybody encountered something similar to this?

EDIT:

Here is the link for the crash report

Upvotes: 0

Views: 322

Answers (1)

Steve Waddicor
Steve Waddicor

Reputation: 2217

You'll probably find a crash report in

~/Library/Logs/DiagnosticReports/

Open it up and take a look. It should let you narrow down the problem.

Edit From the crash log you posted:

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

So we need to look at thread 0 for the error.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff9ac05212 __pthread_kill + 10
1   libsystem_c.dylib               0x00007fff96563b54 pthread_kill + 90
2   libsystem_c.dylib               0x00007fff965a7dce abort + 143
3   libc++abi.dylib                 0x00007fff908b29eb abort_message + 257
4   libc++abi.dylib                 0x00007fff908b039a default_terminate() + 28
5   libobjc.A.dylib                 0x00007fff97366887 _objc_terminate() + 111
6   libc++abi.dylib                 0x00007fff908b03c9 safe_handler_caller(void (*)()) + 8
7   libc++abi.dylib                 0x00007fff908b0424 std::terminate() + 16
8   libc++abi.dylib                 0x00007fff908b161b __cxa_rethrow + 85
9   libobjc.A.dylib                 0x00007fff97366575 objc_exception_rethrow + 40
10  com.apple.Foundation            0x00007fff91d957bb -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 484
11  com.apple.Foundation            0x00007fff91d9556d _NSAppleEventManagerGenericHandler + 106
12  com.apple.AE                    0x00007fff9ac40078 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 307
13  com.apple.AE                    0x00007fff9ac3fed9 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 37
14  com.apple.AE                    0x00007fff9ac3fd99 aeProcessAppleEvent + 318
15  com.apple.HIToolbox             0x00007fff9121a709 AEProcessAppleEvent + 100
16  com.apple.AppKit                0x00007fff98c14866 _DPSNextEvent + 1456
17  com.apple.AppKit                0x00007fff98c13e22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
18  com.apple.AppKit                0x00007fff98c0b1d3 -[NSApplication run] + 517
19  com.apple.AppKit                0x00007fff98bafc06 NSApplicationMain + 869
20  Real5D.Real5D                   0x000000010edc3ea2 main + 34 (main.mm:13)
21  libdyld.dylib                   0x00007fff9582c7e1 start + 1

So there's an uncaught exception, coming from somewhere in Apple's application framework that handles events. And not as a result of a method call of yours, but presumably during app start up.

I don't know the answer. You might progress it further by searching google/SO for individual bits of text from the crash log and see it it turns up anything.

Personally what I'd do next is examine the contents of the App bundle very closely, comparing the one you are running with the one that XCode runs correctly. Check that all the files are there.

Upvotes: 2

Related Questions