Cryptic malloc crash
-
I have a basic QAction set up as a sort of test action:
actions_.network_ping_ = new QAction(tr("Ping"), this); connect(actions_.network_ping_, &QAction::triggered, this, [this] { osc_service_->send(EosOscMessage::ping()); });
Whenever I trigger this action, it works as expected, and does exactly as prescribed, but then my program crashes with an error that I don't know what to do with:
PaletteRepo(74405,0x16d1ab000) malloc: Corruption of free object 0x14402bb90: msizes 25903/0 disagree PaletteRepo(74405,0x16d1ab000) malloc: *** set a breakpoint in malloc_error_break to debug
This still happens if I rewrite that lambda in the
connect
call into a slot.If I set a breakpoint and step through, it takes me to
qobjectdefs_impl.h
, specifically line 116:template <typename, typename, typename, typename> struct FunctorCall; template <size_t... II, typename... SignalArgs, typename R, typename Function> struct FunctorCall<std::index_sequence<II...>, List<SignalArgs...>, R, Function> : FunctorCallBase { static void call(Function &f, void **arg) { call_internal<R>(arg, [&] { return f((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...); // < This line }); } };
I'm not super familiar with
malloc
so I don't know whatmalloc_error_break
is or how to set a breakpoint there as the error suggests.Does anybody have any guidance here?
This is in CLion on macOS Sequoia.
-
I have a basic QAction set up as a sort of test action:
actions_.network_ping_ = new QAction(tr("Ping"), this); connect(actions_.network_ping_, &QAction::triggered, this, [this] { osc_service_->send(EosOscMessage::ping()); });
Whenever I trigger this action, it works as expected, and does exactly as prescribed, but then my program crashes with an error that I don't know what to do with:
PaletteRepo(74405,0x16d1ab000) malloc: Corruption of free object 0x14402bb90: msizes 25903/0 disagree PaletteRepo(74405,0x16d1ab000) malloc: *** set a breakpoint in malloc_error_break to debug
This still happens if I rewrite that lambda in the
connect
call into a slot.If I set a breakpoint and step through, it takes me to
qobjectdefs_impl.h
, specifically line 116:template <typename, typename, typename, typename> struct FunctorCall; template <size_t... II, typename... SignalArgs, typename R, typename Function> struct FunctorCall<std::index_sequence<II...>, List<SignalArgs...>, R, Function> : FunctorCallBase { static void call(Function &f, void **arg) { call_internal<R>(arg, [&] { return f((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...); // < This line }); } };
I'm not super familiar with
malloc
so I don't know whatmalloc_error_break
is or how to set a breakpoint there as the error suggests.Does anybody have any guidance here?
This is in CLion on macOS Sequoia.
-
I have a basic QAction set up as a sort of test action:
actions_.network_ping_ = new QAction(tr("Ping"), this); connect(actions_.network_ping_, &QAction::triggered, this, [this] { osc_service_->send(EosOscMessage::ping()); });
Whenever I trigger this action, it works as expected, and does exactly as prescribed, but then my program crashes with an error that I don't know what to do with:
PaletteRepo(74405,0x16d1ab000) malloc: Corruption of free object 0x14402bb90: msizes 25903/0 disagree PaletteRepo(74405,0x16d1ab000) malloc: *** set a breakpoint in malloc_error_break to debug
This still happens if I rewrite that lambda in the
connect
call into a slot.If I set a breakpoint and step through, it takes me to
qobjectdefs_impl.h
, specifically line 116:template <typename, typename, typename, typename> struct FunctorCall; template <size_t... II, typename... SignalArgs, typename R, typename Function> struct FunctorCall<std::index_sequence<II...>, List<SignalArgs...>, R, Function> : FunctorCallBase { static void call(Function &f, void **arg) { call_internal<R>(arg, [&] { return f((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...); // < This line }); } };
I'm not super familiar with
malloc
so I don't know whatmalloc_error_break
is or how to set a breakpoint there as the error suggests.Does anybody have any guidance here?
This is in CLion on macOS Sequoia.