Re: My objects have bad checksums!
Re: My objects have bad checksums!
- Subject: Re: My objects have bad checksums!
- From: Chris Ridd <email@hidden>
- Date: Mon, 23 Jun 2003 10:32:07 +0100
On 23/6/03 9:56 am, Oliver Donald <email@hidden> wrote:
>
Hello list,
>
>
In my current application, an error occurs sometime during execution, though
>
at seemingly random times. The area of code where it happens is the same,
>
but sometimes it happens after the third execution, sometimes the fiftieth,
>
whenever, even though the data is the same each time. The error in the log
>
comes from Malloc(), and says that an objects checksum is bad, probably
>
because it has been modified after being freed. Occasionally the app will
>
quit with Signal 10 sometime later. Even less often, some kind of NSCF
>
object complains that it doesn't respond to a certain method, but one that I
>
have not called.
>
>
The message doesn't seem to occur during debugging, and stack traces from my
>
app's rare crashes do not mention any of my code, so I resorted to using
>
lots of NSLog's to pin it down. I've got it down to a single NSString call,
>
but this call uses only one object argument, alloced and released by the
>
calling method, but untouched by this method. I have been very careful about
>
autoreleased objects and have eliminated them from my app as much as
>
possible.
>
>
Is there any way to find out what object it is that is being modified?
Import the NSDebug.h header into your main.m file, and look in it to see
what sort of memory-related debugging tools can be turned on. It is very
likely you're trashing an object somewhere, and NSDebug can help a lot here.
Cheers,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.