Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when opening molecular editor in Kalzium #1414

Closed
antonio-rojas opened this issue Oct 27, 2023 · 4 comments
Closed

Crash when opening molecular editor in Kalzium #1414

antonio-rojas opened this issue Oct 27, 2023 · 4 comments

Comments

@antonio-rojas
Copy link
Contributor

Avogadro version: (please complete the following information from the About box):

  • Avogadrolibs: 1.98.0
  • Qt: 5.15.11

Desktop version: (please complete the following information):

  • OS:Arch Linux x86_64
  • Compiler GCC 13.2.1

Describe the bug
Kalzium crashes when opening the molecular editor. This is a new crash in 1.98.0, different from #1193

Thread 1 "kalzium" received signal SIGSEGV, Segmentation fault.
Avogadro::QtGui::ScenePluginModel::addItem (this=this@entry=0x555557172970, item=item@entry=0x555557657370)
    at /usr/src/debug/avogadrolibs/avogadrolibs-1.98.0/avogadro/qtgui/scenepluginmodel.cpp:129
Downloading source file /usr/src/debug/avogadrolibs/avogadrolibs-1.98.0/avogadro/qtgui/scenepluginmodel.cpp
129       if (!m_scenePlugins.contains(item)) {                                                                                                           
(gdb) 
(gdb) bt
#0  Avogadro::QtGui::ScenePluginModel::addItem(Avogadro::QtGui::ScenePlugin*) (this=this@entry=0x555557172970, item=item@entry=0x555557657370)
    at /usr/src/debug/avogadrolibs/avogadrolibs-1.98.0/avogadro/qtgui/scenepluginmodel.cpp:129
#1  0x00005555555e0f01 in KalziumGLWidget::KalziumGLWidget(QWidget*)
    (this=0x555557172840, parent=<optimized out>, this=<optimized out>, parent=<optimized out>) at /usr/include/avogadro/qtopengl/glwidget.h:86
#2  0x00005555555e1d6a in Ui_moleculeViewerForm::setupUi(QWidget*) (moleculeViewerForm=0x5555570e8f10, this=0x555555f60818)
    at /usr/src/debug/kalzium/build/src/ui_moleculeviewerwidget.h:104
#3  MoleculeDialog::MoleculeDialog(QWidget*) (this=0x555555f607c0, parent=0x555555a86610, this=<optimized out>, parent=<optimized out>)
    at /usr/src/debug/kalzium/kalzium-23.08.2/src/tools/moleculeview.cpp:77
#4  0x0000555555621352 in Kalzium::slotMoleculeviewer() (this=0x555555a86610) at /usr/src/debug/kalzium/kalzium-23.08.2/src/kalzium.cpp:355
#5  0x00007ffff58d1097 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7fffffffd480, r=<optimized out>, this=0x555557026c80, this=<optimized out>, r=<optimized out>, a=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#6  doActivate<false>(QObject*, int, void**) (sender=0x555557172380, signal_index=4, argv=0x7fffffffd480) at kernel/qobject.cpp:3925
#7  0x00007ffff656bbb7 in QAction::triggered(bool) (this=this@entry=0x555557172380, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#8  0x00007ffff657160b in QAction::activate(QAction::ActionEvent) (this=0x555557172380, event=<optimized out>) at kernel/qaction.cpp:1161
#9  0x00007ffff66603ce in QAbstractButtonPrivate::click() (this=0x55555749d0b0) at widgets/qabstractbutton.cpp:399
#10 0x00007ffff66605d0 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) (this=0x55555749cc90, e=0x7fffffffda00) at widgets/qabstractbutton.cpp:1045
#11 0x00007ffff675375f in QToolButton::mouseReleaseEvent(QMouseEvent*) (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:622
#12 0x00007ffff65af1a1 in QWidget::event(QEvent*) (this=0x55555749cc90, event=0x7fffffffda00) at kernel/qwidget.cpp:8671
#13 0x00007ffff65788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    (this=this@entry=0x5555558fb340, receiver=receiver@entry=0x55555749cc90, e=e@entry=0x7fffffffda00) at kernel/qapplication.cpp:3640
#14 0x00007ffff657ddaf in QApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55555749cc90, e=0x7fffffffda00)
    at kernel/qapplication.cpp:3084
#15 0x00007ffff589c168 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55555749cc90, event=0x7fffffffda00)
    at kernel/qcoreapplication.cpp:1064
--Type <RET> for more, q to quit, c to continue without paging--
#16 0x00007ffff589c1f3 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>)
    at kernel/qcoreapplication.cpp:1474
#17 0x00007ffff657c0ea in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)
    (receiver=0x55555749cc90, event=0x7fffffffda00, alienWidget=<optimized out>, nativeWidget=0x555555a86610, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#18 0x00007ffff65cce85 in QWidgetWindow::handleMouseEvent(QMouseEvent*) (this=this@entry=0x555557439d10, event=event@entry=0x7fffffffdd60)
    at kernel/qwidgetwindow.cpp:684
#19 0x00007ffff65cebd7 in QWidgetWindow::event(QEvent*) (this=0x555557439d10, event=0x7fffffffdd60) at kernel/qwidgetwindow.cpp:300
#20 0x00007ffff65788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555557439d10, e=0x7fffffffdd60)
    at kernel/qapplication.cpp:3640
#21 0x00007ffff589c168 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555557439d10, event=0x7fffffffdd60)
    at kernel/qcoreapplication.cpp:1064
#22 0x00007ffff589c1f3 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>)
    at kernel/qcoreapplication.cpp:1474
#23 0x00007ffff5d4194c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (e=0x555557665e00)
    at kernel/qguiapplication.cpp:2285
#24 0x00007ffff5d2a6e5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=...)
    at kernel/qwindowsysteminterface.cpp:1169
#25 0x00007ffff121bce5 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /usr/lib/libQt5WaylandClient.so.5
#26 0x00007ffff1b0df69 in g_main_dispatch (context=0x7fffd4000ec0) at ../glib/glib/gmain.c:3476
#27 0x00007ffff1b6c327 in g_main_context_dispatch_unlocked (context=0x7fffd4000ec0) at ../glib/glib/gmain.c:4284
#28 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffd4000ec0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/glib/gmain.c:4349
#29 0x00007ffff1b0c162 in g_main_context_iteration (context=0x7fffd4000ec0, may_block=1) at ../glib/glib/gmain.c:4414
#30 0x00007ffff58eaf7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5555559d0c30, flags=...)
--Type <RET> for more, q to quit, c to continue without paging--
    at kernel/qeventdispatcher_glib.cpp:423
#31 0x00007ffff589ae74 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffe100, flags=..., flags@entry=...)
    at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#32 0x00007ffff589c313 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#33 0x00007ffff5d3bf02 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#34 0x00007ffff6576cda in QApplication::exec() () at kernel/qapplication.cpp:2832
#35 0x00005555555d9123 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kalzium/kalzium-23.08.2/src/main.cpp:130
@welcome
Copy link

welcome bot commented Oct 27, 2023

Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/

@ghutchis
Copy link
Member

I think we need to discuss how Kalzium is embedding Avogadro. The code that's flagged is simply a QList< pointer > - there's zero reason for that to crash.

The selection tool / layer crashes made sense. This also looks like it's compiled with RelWithDebInfo (e.g. "-g -O2") and full-on-debug compile with "-g" would probably be more useful.

Is there a good way to test Kalzium without all the KDE compiles?

@antonio-rojas
Copy link
Contributor Author

OK, turns out this is just an ABI break introduced in d3b1035, where a new member is added to the GLRenderer class. Rebuilding kalzium fixes it.

The library soversion should have been bumped for this, but I guess it's too late now that the release is out.

@ghutchis
Copy link
Member

Glad to hear it's solvable. I'll mark a note about ABI versioning in the release checklist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants