Crash with error for object 0x608000647bec: Invalid pointer dequeued from free list

I'm experiencing crash (not systematic) with the following message :


Plein Temps(18197,0x70000019a000) malloc: *** error for object 0x608000647bec: Invalid pointer dequeued from free list

*** set a breakpoint in malloc_error_break to debug


What does bec means ? binary error correction ?


What could cause it ? a hardware error ?

Accepted Reply

"bec" is the last 3-hex-digit portion of the object address.


The error message indicates a pointer to a block of freed memory doesn't actually point to free memory. (Either the pointer itself has been changed in some way, or the memory it points to has been overwritten in a way that clobbers a consistency check.)


The most likely cause is that the memory is a freed object instance, but your code as an unretained reference to it and has tried to use it like a "live" instance. Or it may just be a block of non-object memory that has been modified after being freed.


That is to say, this is likely a memory management bug in your code.


You can try setting a symbolic breakpoint at "malloc_error_break", but my guess is that this will be long after the real problem, and won't tell you what really went wrong.

Replies

"bec" is the last 3-hex-digit portion of the object address.


The error message indicates a pointer to a block of freed memory doesn't actually point to free memory. (Either the pointer itself has been changed in some way, or the memory it points to has been overwritten in a way that clobbers a consistency check.)


The most likely cause is that the memory is a freed object instance, but your code as an unretained reference to it and has tried to use it like a "live" instance. Or it may just be a block of non-object memory that has been modified after being freed.


That is to say, this is likely a memory management bug in your code.


You can try setting a symbolic breakpoint at "malloc_error_break", but my guess is that this will be long after the real problem, and won't tell you what really went wrong.

Which version Xcode?


What is deployment target iOS version?

You can try setting a symbolic breakpoint at "mallocerrorbreak", but my guess is that this will be long after the real problem, and won't tell you what really went wrong.

Indeed.

@Claude31, You should run your program with Zombies to see if that gets you closer to the root cause of the problem. If not, try again with Address Sanitizer.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"