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?
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 typeb malloc_error_break
.