Linux segfault on modelbuilder exit

I have an ongoing problem with linux builds on the master branch. It has been there awhile, and I kept thinking it would go away as the branch matured, but that is not the case. I will paste an example stack trace below, but the symptom occurs when closing modelbuilder with a model resource loaded.

When the main window closes, the qtResourceBrowser destructor deletes its Internal instance. The destructor for that internal instance has the message “Unregister our decorator before we become invalid” at smtk/extension/qt/qtResourceBrowserP.cxx:45. It appears, however, that something else is taking down the PhraseModel, or at least parts of it, and a segfault occurs typically somewhere below DescriptivePhrase::setContent().

Has anyone else observed this behavior on Linux?

Loguru caught a signal: SIGSEGV
Stack trace:
23            0x40b907 ./modelbuilder-6.3.0-rc1-Linux-64bit/bin/modelbuilder() [0x40b907]
22      0x7fdd9d319830 __libc_start_main + 240
21            0x40b4b3 ./modelbuilder-6.3.0-rc1-Linux-64bit/bin/modelbuilder() [0x40b4b3]
20            0x412a5a ./modelbuilder-6.3.0-rc1-Linux-64bit/bin/modelbuilder() [0x412a5a]
19            0x40bb29 ./modelbuilder-6.3.0-rc1-Linux-64bit/bin/modelbuilder() [0x40bb29]
18      0x7fdda8c83fec QWidget::~QWidget() + 876
17      0x7fdda7df5e3b QObjectPrivate::deleteChildren() + 203
16      0x7fdd793e6ba9 pqSMTKResourcePanel::~pqSMTKResourcePanel() + 9
15      0x7fdd793e6b7b pqSMTKResourcePanel::~pqSMTKResourcePanel() + 43
14      0x7fdd7c43bc69 smtk::extension::qtUIManager::~qtUIManager() + 9
13      0x7fdd7c43ba3e smtk::extension::qtUIManager::~qtUIManager() + 46
12      0x7fdd793ce7d9 pqSMTKResourceBrowser::~pqSMTKResourceBrowser() + 9
11      0x7fdd7c4c3b1b smtk::extension::qtResourceBrowser::~qtResourceBrowser() + 43
10      0x7fdd7c4c944a smtk::extension::qtResourceBrowser::Internal::~Internal() + 74
9       0x7fdd89a6a602 smtk::view::PhraseModel::setDecorator(std::function<void (std::shared_ptr<smtk::view::DescriptivePhrase>)> const&) + 146
8       0x7fdd89a6a748 smtk::view::PhraseModel::redecorate() + 104
7       0x7fdd89a5a998 smtk::view::DescriptivePhrase::visitChildren(std::function<int (std::shared_ptr<smtk::view::DescriptivePhrase>, std::vector<int>&)>) + 104
6       0x7fdd89a5a7e2 smtk::view::DescriptivePhrase::visitChildrenInternal(std::function<int (std::shared_ptr<smtk::view::DescriptivePhrase>, std::vector<int>&)>, std::vector<int>&) + 882
5       0x7fdd89a5a60c smtk::view::DescriptivePhrase::visitChildrenInternal(std::function<int (std::shared_ptr<smtk::view::DescriptivePhrase>, std::vector<int>&)>, std::vector<int>&) + 412
4       0x7fdd89a6ab68 /home/john/projects/lanl/packages/200113/modelbuilder-6.3.0-rc1-Linux-64bit/bin/../lib/smtk-3.3.0/smtkAttributePlugin/../../ [0x7fdd89a6ab68]
3       0x7fdd89a58558 smtk::view::DescriptivePhrase::setContent(std::shared_ptr<smtk::view::PhraseContent>) + 984
2       0x7fdd89a66005 smtk::view::PhraseListContent::operator==(smtk::view::PhraseContent const&) const + 181
1       0x7fdd9dbc637a std::basic_string<char, std::char_traits<char> >::basic_string(std::string const&) + 106
0       0x7fdd9d32e4b0 /lib/x86_64-linux-gnu/ [0x7fdd9d32e4b0]
(  47.422s) [paraview        ]                       :0     FATL| Signal: SIGSEGV
Segmentation fault (core dumped)

It has happened for me too. I’m not seeing it with my current build. Maybe SMTK being RelWithDebInfo hides it?

So would anyone object if, for linux, we #ifdef out the line in the qtResourceBrowser::Internal destructor that sets the null decorator (until the crash is resolved)?

It doesn’t seem like a great idea to me…

Privacy Notice