How to “set a breakpoint in malloc_error_break to debug” in Qt Creator?

别说谁变了你拦得住时间么 提交于 2019-12-10 17:53:59

问题


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:


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.



来源:https://stackoverflow.com/questions/38171098/how-to-set-a-breakpoint-in-malloc-error-break-to-debug-in-qt-creator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!