You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When looking at this issue, I noticed something in SoCallbackAction which might be a memory leak (but then realized it is not but nonetheless explains the crash) - I only read the source, I did not compile or debug it. So please bare with me if this report is incorrect:
This extends the given SbList to have enough entries, adding NULL entries as necessary, then places a pointer to a newly allocated instance of SOCallbackData in the appropriate entry.
Subsequent calls to addPreCallback, use append of the first SOCallbackData to add allocated instances of SOCallbackDatas.
The destructor of SoCallbackAction calls delete_list_elements on the list, which calls for each index deleteAll on the element it points to (SOCallbackData 1 in the above example). It also tries to call deleteAll on entries that were set to NULL when expanding, thus calling ((SoCallbackAction *)NULL)->deleteAll() which leads to crashes.
The text was updated successfully, but these errors were encountered:
When looking at this issue, I noticed something in SoCallbackAction which might be a memory leak (but then realized it is not but nonetheless explains the crash) - I only read the source, I did not compile or debug it. So please bare with me if this report is incorrect:
Calling
SoCallbackAction::addPreCallback
callsset_callback_data
which in turn callsset_callback_data_idx
.This extends the given
SbList
to have enough entries, adding NULL entries as necessary, then places a pointer to anew
ly allocated instance ofSOCallbackData
in the appropriate entry.Subsequent calls to
addPreCallback
, useappend
of the firstSOCallbackData
to add allocated instances ofSOCallbackData
s.After a few calls, the list looks like this:
The destructor of
SoCallbackAction
callsdelete_list_elements
on the list, which calls for each indexdeleteAll
on the element it points to (SOCallbackData 1
in the above example). It also tries to calldeleteAll
on entries that were set to NULL when expanding, thus calling((SoCallbackAction *)NULL)->deleteAll()
which leads to crashes.The text was updated successfully, but these errors were encountered: