updraft/updraft — Issue #68: Segfault in settings
Author: bluecube
Created: 2012-02-06 13:28:21+00:00
State: open

After adding a setting to IgcViewer settings segfault when adding a group in testplugin.

Backtrace:

'''
#0 0xb756f014 in QWidget::layout() const () from /usr/lib/qt4/libQtGui.so.4
#1 0x0808700f in Updraft::Core::SettingsBottomView::dataChanged (this=0x81ec7c0, topLeft=..., bottomRight=...) at /home/cube/updraft/Updraft/src/core/ui/settingsbottomview.cpp:198
#2 0x080ac2cf in Updraft::Core::SettingsBottomView::qt_metacall (this=0x81ec7c0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbfffdf24)
at /home/cube/updraft/Updraft/build/src/core/ui/moc_settingsbottomview.cxx:83
#3 0xb726853d in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#4 0xb727bd3c in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#5 0xb72ce6ce in QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib/qt4/libQtCore.so.4
#6 0x080a2de8 in Updraft::Core::SettingsModel::setData (this=0x81f1798, index=..., value=..., role=0) at /home/cube/updraft/Updraft/src/core/settingsmodel.cpp:262
#7 0x080a02f3 in Updraft::Core::SettingsManager::addGroupInternal (this=0x81e7e48, groupId=..., description=..., icon=...)
at /home/cube/updraft/Updraft/src/core/settingsmanager.cpp:213
#8 0x0809f68c in Updraft::Core::SettingsManager::addGroup (this=0x81e7e48, groupId=..., description=..., icon=...) at /home/cube/updraft/Updraft/src/core/settingsmanager.cpp:115
#9 0x0807f8f3 in Updraft::Core::CoreImplementation::addSettingsGroup (this=0x861dbd0, groupId=..., description=..., icon=...)
at /home/cube/updraft/Updraft/src/core/coreimplementation.cpp:61
#10 0xb194cef2 in Updraft::TestPlugin::initialize (this=0x8929700) at /home/cube/updraft/Updraft/src/plugins/testplugin/plugin.cpp:226
#11 0x0809b841 in Updraft::Core::PluginManager::finishLoading (this=0x861d260, obj=0x8929700) at /home/cube/updraft/Updraft/src/core/pluginmanager.cpp:117
#12 0x0809b499 in Updraft::Core::PluginManager::load (this=0x861d260, fileName=...) at /home/cube/updraft/Updraft/src/core/pluginmanager.cpp:60
#13 0x0809ae91 in Updraft::Core::PluginManager::PluginManager (this=0x861d260) at /home/cube/updraft/Updraft/src/core/pluginmanager.cpp:35
#14 0x080815a9 in Updraft::Core::Updraft::Updraft (this=0xbfffe654, argc=1, argv=0xbfffe724) at /home/cube/updraft/Updraft/src/core/updraft.cpp:19
#15 0x0807b295 in main (argc=1, argv=0xbfffe724) at /home/cube/updraft/Updraft/src/core/main.cpp:4
'''

Code I added to IgcViewer:

'''C++
core->addSettingsGroup("igcviewer", tr("IGC Visualization"));
lineWidthSetting = core->addSetting("igcviewer:linewidth",
tr("Line width"), 400.0);
'''