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 exiting #715

Open
guihkx opened this issue Oct 24, 2024 · 1 comment
Open

Crash when exiting #715

guihkx opened this issue Oct 24, 2024 · 1 comment

Comments

@guihkx
Copy link
Collaborator

guihkx commented Oct 24, 2024

I didn't find a way to reproduce this crash yet, but looking at my system logs I noticed it happening a few times, so I'm using this issue to at least save some information about the crash.

This is on 75c876e with Qt 6.8.0 on Linux:

(gdb) bt
#0  NodeTreeItem::row (this=this@entry=0x30) at src/nodetreemodel.cpp:160
#1  0x00005a04bf1ca384 in NodeTreeModel::parent (this=0x5a04f2593960, index=...) at src/nodetreemodel.cpp:281
#2  0x00007875969713b3 in QModelIndex::parent (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/itemmodels/qabstractitemmodel.h:506
#3  QItemSelection::select (this=0x7ffd8c1324f0, topLeft=..., bottomRight=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp:395
#4  0x0000787596976e83 in QItemSelection::QItemSelection (this=0x7ffd8c1324f0, topLeft=..., bottomRight=...)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp:379
#5  QItemSelectionModel::select (this=0x5a04f38028e0, index=..., command=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp:1175
#6  0x00005a04bf1d7f1d in NodeTreeView::mouseReleaseEvent (this=0x5a04f2a73fc0, event=<optimized out>) at src/nodetreeview.cpp:593
#7  0x0000787598151276 in QWidget::event (this=0x5a04f2a73fc0, event=0x7ffd8c1328b0) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qwidget.cpp:8963
#8  0x00007875981edb48 in QFrame::event (this=0x5a04f2a73fc0, e=0x7ffd8c1328b0) at /usr/src/debug/qt6-base/qtbase/src/widgets/widgets/qframe.cpp:521
#9  0x0000787596755508 in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x5a04f29da1a0, event=event@entry=0x7ffd8c1328b0)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1304
#10 0x00007875980fe30a in QApplicationPrivate::notify_helper (this=this@entry=0x5a04f19eacb0, receiver=receiver@entry=0x5a04f29da1a0, e=e@entry=0x7ffd8c1328b0)
    at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3288
#11 0x00007875981026ea in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffd8c132b90) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2772
#12 0x00007875967585a8 in QCoreApplication::notifyInternal2 (receiver=0x5a04f28bc190, event=0x7ffd8c132b90) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1165
#13 0x00007875967585fd in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1623
#14 0x00007875980f61bd in QApplicationPrivate::sendMouseEvent (receiver=0x5a04f28bc190, event=0x7ffd8c132b90, alienWidget=<optimized out>, nativeWidget=0x7ffd8c133440, 
    buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2353
#15 0x000078759816a768 in QWidgetWindow::handleMouseEvent (this=0x5a04f29f2890, event=0x7ffd8c132e80) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qwidgetwindow.cpp:632
#16 QWidgetWindow::event (this=0x5a04f29f2890, event=0x7ffd8c132e80) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qwidgetwindow.cpp:298
#17 0x00007875980fe31a in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5a04f29f2890, e=0x7ffd8c132e80)
    at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3294
#18 0x00007875967585a8 in QCoreApplication::notifyInternal2 (receiver=0x5a04f29f2890, event=0x7ffd8c132e80) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1165
#19 0x00007875967585fd in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1623
#20 0x0000787596d85d4b in QGuiApplicationPrivate::processMouseEvent (e=0x78755802eda0) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qguiapplication.cpp:2461
#21 0x0000787596e01284 in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1114
#22 0x00007875927eeb87 in xcbSourceDispatch (source=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:57
#23 0x000078759590d559 in g_main_dispatch (context=0x78758c000f30) at ../glib/glib/gmain.c:3357
#24 0x0000787595970157 in g_main_context_dispatch_unlocked (context=0x78758c000f30) at ../glib/glib/gmain.c:4208
#25 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x78758c000f30, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4273
#26 0x000078759590ca55 in g_main_context_iteration (context=0x78758c000f30, may_block=1) at ../glib/glib/gmain.c:4338
#27 0x00007875969bf71d in QEventDispatcherGlib::processEvents (this=0x5a04f1a6e960, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:396
#28 0x0000787596764566 in QEventLoop::processEvents (this=0x7ffd8c133350, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:100
#29 QEventLoop::exec (this=0x7ffd8c133350, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:191
#30 0x0000787596759a2f in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:74
#31 0x00007875980fa74a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2562
#32 0x00005a04bf143e1e in main (argc=<optimized out>, argv=<optimized out>) at src/main.cpp:107
(gdb) list
155         }
156     }
157
158     int NodeTreeItem::row() const
159     {
160         if (m_parentItem) {
161             return m_parentItem->m_childItems.indexOf(const_cast<NodeTreeItem *>(this));
162         }
163
164         return 0;
(gdb) print &this->m_parentItem
$1 = (NodeTreeItem **) 0x50
(gdb)

The cause of the crash is clearly m_parentItem pointing to an invalid memory address (0x50) and then getting dereferenced, but I don't know yet how that happened or how to trigger it.

@nuttyartist
Copy link
Owner

Keep us posted !

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