Crash on exit in Qt label update
I'm occasionally seeing a crash on exit in aevaCMB, but the call stack is pointing to smtk. It appears to be trying to update a label after the Qt object has been deleted or made invalid.
I think the crash happens when the operation tool parameters panel has focus when I exit.
smtk/extension/qt/qtReferenceItem.cxx:49
49 lbl->setText(txt);
Full trace:
45 0x55555556739a /mnt/projects/cmb/sb/build/install/bin/aevaCMB(+0x1339a) [0x55555556739a]
44 0x7fffe618ec8e __libc_start_main + 238
43 0x7fffe61b012a /lib/x86_64-linux-gnu/libc.so.6(+0x4312a) [0x7fffe61b012a]
42 0x7fffe61b0031 /lib/x86_64-linux-gnu/libc.so.6(+0x43031) [0x7fffe61b0031]
41 0x7fffb2925c5c smtkPQComponentsPluginPlugin::~smtkPQComponentsPluginPlugin() + 194
40 0x7ffff3bc00fe QObject::~QObject() + 958
39 0x7ffff3bb574b QObjectPrivate::deleteChildren() + 203
38 0x7fffb29bdb4e pqSMTKAppComponentsAutoStartImplementation::~pqSMTKAppComponentsAutoStartImplementation() + 24
37 0x7fffb29bdb02 pqSMTKAppComponentsAutoStartImplementation::~pqSMTKAppComponentsAutoStartImplementation() + 96
36 0x7fffb293254a pqSMTKAppComponentsAutoStart::~pqSMTKAppComponentsAutoStart() + 24
35 0x7fffb293252a pqSMTKAppComponentsAutoStart::~pqSMTKAppComponentsAutoStart() + 72
34 0x7ffff3bc00fe QObject::~QObject() + 958
33 0x7ffff3bb574b QObjectPrivate::deleteChildren() + 203
32 0x7ffff78b41b0 pqSMTKBehavior::~pqSMTKBehavior() + 24
31 0x7ffff78b4151 pqSMTKBehavior::~pqSMTKBehavior() + 167
30 0x7ffff78b4aa3 pqSMTKBehavior::removeManagerFromServer(pqServer*) + 275
29 0x7fffed6d9975 smtk::resource::Manager::clear() + 227
28 0x7fffed6dde64 /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkCore.so(+0xa5ce64) [0x7fffed6dde64]
27 0x7ffff57a3f50 std::function<void (smtk::resource::Resource const&, smtk::resource::EventType)>::operator()(smtk::resource::Resource const&, smtk::resource::EventType) const + 96
26 0x7fffb293ac07 /mnt/projects/cmb/sb/build/install/bin/../lib/smtk-22.02.100/smtkPQComponentsPlugin/smtkPQComponentsPlugin.so(+0x1b5c07) [0x7fffb293ac07]
25 0x7fffb29397c7 /mnt/projects/cmb/sb/build/install/bin/../lib/smtk-22.02.100/smtkPQComponentsPlugin/smtkPQComponentsPlugin.so(+0x1b47c7) [0x7fffb29397c7]
24 0x7fffb2921bbc pqSMTKCallObserversOnMainThreadBehavior::resourceEvent(QString, int, pqSMTKCallObserversOnMainThreadBehavior::QPrivateSignal) + 142
23 0x7ffff3bc24f7 /mnt/projects/cmb/sb/build/install/bin/../lib/libQt5Core.so.5(+0x2ea4f7) [0x7ffff3bc24f7]
22 0x7fffb293b339 /mnt/projects/cmb/sb/build/install/bin/../lib/smtk-22.02.100/smtkPQComponentsPlugin/smtkPQComponentsPlugin.so(+0x1b6339) [0x7fffb293b339]
21 0x7fffb293b6a9 /mnt/projects/cmb/sb/build/install/bin/../lib/smtk-22.02.100/smtkPQComponentsPlugin/smtkPQComponentsPlugin.so(+0x1b66a9) [0x7fffb293b6a9]
20 0x7fffb293b7e0 /mnt/projects/cmb/sb/build/install/bin/../lib/smtk-22.02.100/smtkPQComponentsPlugin/smtkPQComponentsPlugin.so(+0x1b67e0) [0x7fffb293b7e0]
19 0x7fffb2939962 /mnt/projects/cmb/sb/build/install/bin/../lib/smtk-22.02.100/smtkPQComponentsPlugin/smtkPQComponentsPlugin.so(+0x1b4962) [0x7fffb2939962]
18 0x7fffb293d0a2 std::enable_if<!std::is_integral<decltype (((declval<std::function<void (smtk::resource::Resource const&, smtk::resource::EventType)> >)())({parm#1}...))>::value, decltype (((declval<std::function<void (smtk::resource::Resource const&, smtk::resource::EventType)> >)())({parm#1}...))>::type smtk::common::Observers<std::function<void (smtk::resource::Resource const&, smtk::resource::EventType)>, false>::callObserversDirectly<smtk::resource::Resource&, smtk::resource::EventType>(smtk::resource::Resource&, smtk::resource::EventType&&) + 270
17 0x7ffff57a3f50 std::function<void (smtk::resource::Resource const&, smtk::resource::EventType)>::operator()(smtk::resource::Resource const&, smtk::resource::EventType) const + 96
16 0x7fffedc1c7b4 /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkCore.so(+0xf9b7b4) [0x7fffedc1c7b4]
15 0x7fffedc15f7f /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkCore.so(+0xf94f7f) [0x7fffedc15f7f]
14 0x7fffedbf680f smtk::view::ComponentPhraseModel::handleResourceEvent(smtk::resource::Resource const&, smtk::resource::EventType) + 99
13 0x7fffedbf7743 smtk::view::ComponentPhraseModel::processResource(std::shared_ptr<smtk::resource::Resource> const&, bool) + 703
12 0x7fffedc19a87 smtk::view::PhraseModel::updateChildren(std::shared_ptr<smtk::view::DescriptivePhrase>, std::vector<std::shared_ptr<smtk::view::DescriptivePhrase>, std::allocator<std::shared_ptr<smtk::view::DescriptivePhrase> > >&, std::vector<int> const&) + 2067
11 0x7fffedc1bd85 smtk::view::PhraseModel::trigger(std::shared_ptr<smtk::view::DescriptivePhrase>, smtk::view::PhraseModelEvent, std::vector<int> const&, std::vector<int> const&, std::vector<int> const&) + 391
10 0x7fffedc2096c /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkCore.so(+0xf9f96c) [0x7fffedc2096c]
9 0x7fffedc23347 /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkCore.so(+0xfa2347) [0x7fffedc23347]
8 0x7fffedc1e341 /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkCore.so(+0xf9d341) [0x7fffedc1e341]
7 0x7ffff575ee04 /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkQtExt.so(+0x33de04) [0x7ffff575ee04]
6 0x7ffff575af2b /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkQtExt.so(+0x339f2b) [0x7ffff575af2b]
5 0x7ffff575e5f4 smtk::extension::qtReferenceItem::checkRemovedComponents(std::shared_ptr<smtk::view::DescriptivePhrase>, smtk::view::PhraseModelEvent, std::vector<int> const&, std::vector<int> const&, std::vector<int> const&) + 1394
4 0x7ffff575daf2 smtk::extension::qtReferenceItem::updateSynopsisLabels() const + 280
3 0x7ffff5758d89 /mnt/projects/cmb/sb/build/install/bin/../lib/libsmtkQtExt.so(+0x337d89) [0x7ffff5758d89]
2 0x7ffff4beaa65 QLabel::setText(QString const&) + 53
1 0x7ffff3a15f0a operator==(QString const&, QString const&) + 10
0 0x7fffe70b4980 /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980) [0x7fffe70b4980]
(8359.096s) [paraview ] :0 FATL| Signal: SIGSEGV
Edited by Aron Helser