Re: [newbie] SIGSEGV and GDB
Re: [newbie] SIGSEGV and GDB
- Subject: Re: [newbie] SIGSEGV and GDB
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 9 Mar 2005 23:06:55 -0700
On Mar 9, 2005, at 10:21 PM, Julien Palmas wrote:
What i mostly do in my app is add some points (NSValue) in an array
thanks to mouse clics in a view and do some calculations with those
points. To do these calculations, i realloc some double *foo with the
new number of points. these double *foo were malloced at the
beginning of my app.
everything goes fine when i run the app, and then, when i quit, once
in while, i get a SIGSEGV.
But the strange thing is that i never get this SIGSEGV when i run the
app in GDB. GDB always tells me that my app exited nicely, which is
not always true !!
Please do not cross threads! This thread was originally about
asymmetrical behavior in NSMutableArray.
It sounds like your program may have a memory overrun error. Try
running the program in the debugger again, but this time try enabling
Guard Malloc in the Debug menu of Xcode. Running the program with Guard
Malloc in the debugger will slow the program down considerably, but it
will also make the debugger stop execution when a memory error occurs.
See the man page for "libgmalloc" for more details.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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