Re: Crashing before NSApplicationMain
Re: Crashing before NSApplicationMain
- Subject: Re: Crashing before NSApplicationMain
- From: John Stiles <email@hidden>
- Date: Tue, 20 Dec 2005 10:48:47 -0800
I've seen this in two instances:
- a global C++ object is corrupting the stack/heap somehow
- your main() function is missing, and ZeroLink is on--rather than
give a decent error, it just blows up (radar filed)
Anyway, assuming it's not the "main()" thing, you can set a
breakpoint in the constructor for each object that will be
instantiated globally and just keep hitting "continue" until it blows
up. You might end up setting a lot of breakpoints, but if you're
otherwise stumped...
On Dec 20, 2005, at 6:29 AM, Daniel Jalkut wrote:
Hi Greg:
On Dec 20, 2005, at 4:26 AM, Greg Hulands wrote:
I have started seeing in my application that it crashes before it
reaches NSApplicationMain. The backtrace of it is:
Great! If you just started seeing it, then something changed
recently, right? What was it? :) Only half-joking.
#0 0x00000000 in ?? ()
#1 0x00001df0 in start ()
#2 0x00001c98 in start ()
With an EXC_BAD_ACCESS
Which really makes it difficult to find out what is causing it
when its current frame doesn't even know its function name
(probably because it is at NULL). I have tried using the options
available in NSDebug.h, but it seems not to have an effect on it.
No more information is given.
It's pretty bleak, but assuming the backtrace is accurate - it's
more helpful than a completely slammed stack. Try setting a
breakpoint at *0x1dec, where you'll hopefully be able to poke
around and see where it's getting the idea that it should be
calling a NULL function pointer.
If you can get a since for what the code is that you're in, you
might be able to download it from Apple's Darwin source page:
http://www.opensource.apple.com/darwinsource/10.4.3/
In particular I'd check out the dyld project. If you can find clues
in the assembly code to point you to the corresponding source file,
it might make it exceedingly clear what is failing.
Is there anything I can do to try and track down why this is
occurring?
Like many tough bugs, when you think you can't do anything else to
make progress - just do *something* and eventually it will happen.
Another thing to think about is "what happens before main?" I'm not
too expert about this but I imagine language-specific things like
global initialization happen here. What about C++ ... are you using
any C++ objects in your project?
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden