This script crashes on exit (run without -b):
I assume the object doesn't matter, attaching just in case.
Trying a backtrace to show what happened last: Stack frames: 10 0: OpenFlipper :: backtrace() (+0x26) [0x558fe6cc53f6] 1: OpenFlipper :: segfaultHandling(int) (+0x16a) [0x558fe6cc5e8a] 2: /lib/x86_64-linux-gnu/libc.so.6 :: (+0x33040) [0x7f008d560040] 3: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 :: QWidget::~QWidget() (+0x47f) [0x7f008f5e9cef] 4: /home/mxn/src/OpenFlipper-Free/build-reldebug/Build/lib/plugins/libPlugin-SelectionMeshObject.so :: MeshObjectSelectionPlugin::~MeshObjectSelectionPlugin() (+0x1fd) [0x7effa051572d] 5: /home/mxn/src/OpenFlipper-Free/build-reldebug/Build/lib/plugins/libPlugin-SelectionMeshObject.so :: MeshObjectSelectionPlugin::~MeshObjectSelectionPlugin() (+0x9) [0x7effa05159f9] 6: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 :: (+0x273839) [0x7f008ecb8839] 7: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 :: (+0x274fcf) [0x7f008ecb9fcf] 8: /lib/x86_64-linux-gnu/libc.so.6 :: __cxa_finalize (+0x8f) [0x7f008d562c8f] 9: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 :: (+0x7ed43) [0x7f008eac3d43] Backtrace completed, trying to abort now ... Trying to get additional information (This might fail if the memory is corrupted). terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc  5551 abort (core dumped) OpenFlipper -c crash.ofs
Not entirely sure what the problem is - especially as it does not occur when manually exiting OF instead of using core.exitApplication.
when exactly does this happen? only when OpenFlipper is run in nogui mode?
edit: if this is only happening in nogui mode, it would be super nice if you could provide me with a small script that can be used as a unittest.
it only happens in scripted gui mode with an exit call, the script in the post above suffices.
I'm just building a clean version of openflipper to make sure my own plugins and incremental builds didn't cause this.
I looked into it and it seems like the destructor of the selection base plugin is called before the destructor of the meshobjectselection plugin. since mos plugin has attached the parameterWidget to base object, it cannot delete it anymore... i extended the interface to allow removing parameterwidgets, but since the order is wrong, this alone will not work.
However this issue has low priority, as the crash occurs only in scripted gui mode when exiting. just removing the delete parameterWidget will prevent the exception. I think the ownership of the parameterwidget has to be reconsidered.
might be related to the crash on exit of the texturecontrol plugin. Only occurs when all other plugins are disabled and seems to be caused by deleting widgets in the destructor instead of the exit slot.
closedToggle commit list