App Launches in Finder, Hangs While Launching in Debugger
App Launches in Finder, Hangs While Launching in Debugger
- Subject: App Launches in Finder, Hangs While Launching in Debugger
- From: Joe Programmer <email@hidden>
- Date: Sun, 13 Dec 2009 23:26:22 -0700
I made a similar post to the Xcode list originally, but it was suggested that I redirect it to the Cocoa list. Here it is:
I'm working with a Cocoa app compiling with gcc 4.0 in Xcode 3.2.1. Both the debug and the release builds launch fine from the Finder, but the app does not launch through the debugger in Xcode. The app's icon appears in the doc, but the app just hangs in the debugger.
I set break points in objc_exception_throw, and in the inits of my model, controller and main window. The app never breaks on any of the inits, only on objc_exception_throw.
Two occurrences of the following massage are appearing in the console:
-[NSCFArray _getCString:maxLength:encoding:]: unrecognized selector sent to instance 0x4016e0
In a reply to my Xcode list post, "From the method signature, it looks like the message should have been sent to an instance of NSString, rather than NSArray, but the leading underscore indicates it is an internal method and might indicate some 'class cluster' trickery going on behind the scenes". But where this is being done is the mystery. With my limited knowledge of Cocoa internals, viewing the call stack does not reveal the cause of this problem.
#0 0x92fad4e6 in objc_exception_throw
#1 0x92a0790b in -[NSObject(NSObject) doesNotRecognizeSelector:]
#2 0x92962db6 in ___forwarding___
#3 0x92962982 in __forwarding_prep_0___
#4 0x9291bc53 in CFStringGetCString
#5 0x930a4990 in _RegisterApplication
#6 0x930a3182 in GetCurrentProcess
#7 0x908e2071 in GetSystemUIMode
#8 0x908e2013 in IsMenuBarVisible
#9 0x93991092 in _NSInitializeAppContext
#10 0x9399094c in -[NSApplication init]
#11 0x93990485 in +[NSApplication sharedApplication]
#12 0x9398f45d in NSApplicationMain
#13 0x00002f6e in main at main.m:42
This app was debugging fine under Xcode 2.5 and 10.5.x. However, I did have to update some of the legacy/depricated code to get it to build in 3.2.1 and 10.6. But since execution doesn't even make it to my inits, these code changes aren't being executed.
My experience leads me to think there might be a problem with reading/processing a resource. I made some changes to resources, but I *think* I was able to back them all out with the error still occurring.
I'm presenting this issue to the list in an effort to gain some insight into the problem and possible/probable areas of my project to focus on.
What is also a bit disturbing about this, is that the debugger catches this exception, but Cocoa/OS does not?!
Thanks,
Joe
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden