Ios – How to “set a breakpoint in malloc_error_break to debug”

iosiphone

I'm getting lots of console outputs like this without my application crashing:

malloc: * error for object 0xc6a3970: pointer being freed was not
allocated *
set a breakpoint in malloc_error_break to debug

How can I find out which object or variable is affected?

I tried setting a symbolic breakpoint like this but it never halts:

enter image description here

Best Answer

Set a breakpoint on malloc_error_break() by opening the Breakpoint Navigator (View->Navigators->Show Breakpoint Navigator or ⌘8), clicking the plus button in the lower left corner, and selecting "Add Symbolic Breakpoint". In the popup that comes up, enter malloc_error_break in the Symbol field, then click Done.

EDIT: openfrog added a screenshot and indicated that he's already tried these steps without success after I posted my answer. With that edit, I'm not sure what to say. I haven't seen that fail to work myself, and indeed I always keep a breakpoint on malloc_error_break set.