当我点击关闭窗口返回时,我的Qt5应用程序崩溃了:
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.
如何在Qt Creator 4(Mac OS)中“在malloc_error_break中设置断点来调试”?
最好通过lldb / gdb中的终端来做,怎么做?
答案 0 :(得分:4)
在“断点”窗口中,右键单击 - > 添加断点... 将断点类型更改为功能名称并键入{{1}在 Funcion:。另一种方法是打开调试器控制台( Cmd + 5 )并键入malloc_error_break
。