How to “set a breakpoint in malloc_error_break to

2019-07-07 03:48发布

My Qt5 app crashes when I hit the close window returning:

MyApp(28741,0x7fff7aa73000) malloc: *** error for object 0x7fc40bc8e300: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
The program has unexpectedly finished.

How to “set a breakpoint in malloc_error_break to debug” in Qt Creator 4 (Mac OS)?

Should be better to do it via terminal in lldb/gdb, how?

Reference: How to find reason for app crash on close?

1条回答
该账号已被封号
2楼-- · 2019-07-07 04:43

In Breakpoints window, right click->Add Breakpoint... change Breakpoint type to Function name and type malloc_error_break in Funcion:. Another way is to open Debugger Console (Cmd+5) and type b malloc_error_break.

查看更多
登录 后发表回答