KingPolygon
KingPolygon

Reputation: 4755

Xcode: Incorrect checksum for freed objects?

I seem to be getting a sigabrt crash every once in a while (not every time).

malloc: *** error for object 0x7ff8884644c0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug.

Now, I know that means I'm probably attempting to access, or change an object after calling free() on it, but I was wondering how to find out what object it's referring to, using the memory address listed above. Thanks!

This is what I see before it crashes (It crashes on NSLog):

enter image description here

enter image description here

Upvotes: 1

Views: 1125

Answers (1)

jarmod
jarmod

Reputation: 78803

One option might be to use a debug malloc replacement such as dmalloc that can help you track source file & line number of malloc/free calls.

Upvotes: 1

Related Questions