Tiled crash when docking uis together

bug.zip (2.9 MB)
Hello,
I’ve uploaded a video that shows how Tiled crashes when I place a UI under another floating one. Didn’t have time to check the forum to see if this is already reported, but here it is anyways.

Cheers

Hmm, the good news is that I could reproduce this crash also on Linux. However, the crash is entirely happening inside of the Qt framework:

1  QWeakPointer<QObject>::internalData                                     qsharedpointer_impl.h      752  0x7ffff6335b99 
2  QPointer<QMainWindowLayout>::data                                       qpointer.h                 75   0x7ffff6335b99 
3  QMainWindowPrivate::mainWindowLayout                                    qmainwindow.cpp            63   0x7ffff6335b99 
4  qt_mainwindow_layout                                                    qmainwindow.cpp            69   0x7ffff6335b99 
5  QDockWidgetGroupLayout::toolBarAreaLayout                               qmainwindowlayout.cpp      281  0x7ffff634ac36 
6  QMainWindowLayoutSeparatorHelper<QDockWidgetGroupLayout>::findSeparator qmainwindowlayout_p.h      291  0x7ffff634ac36 
7  QMainWindowLayoutSeparatorHelper<QDockWidgetGroupLayout>::adjustCursor  qmainwindowlayout_p.h      149  0x7ffff634ae43 
8  QMainWindowLayoutSeparatorHelper<QDockWidgetGroupLayout>::windowEvent   qmainwindowlayout_p.h      224  0x7ffff634b44d 
9  QDockWidgetGroupWindow::event                                           qmainwindowlayout.cpp      308  0x7ffff6348527 
10 QApplicationPrivate::notify_helper                                      qapplication.cpp           3296 0x7ffff61903f6 
11 QApplication::notify                                                    qapplication.cpp           2774 0x7ffff6199028 
12 QCoreApplication::notifyInternal2                                       qcoreapplication.cpp       1168 0x7ffff4d7bcaa 
13 QCoreApplication::sendSpontaneousEvent                                  qcoreapplication.cpp       1626 0x7ffff4d7becd 
14 QApplicationPrivate::sendMouseEvent                                     qapplication.cpp           2355 0x7ffff619836d 
15 QWidgetWindow::handleMouseEvent                                         qwidgetwindow.cpp          667  0x7ffff62037b7 
16 QWidgetWindow::event                                                    qwidgetwindow.cpp          299  0x7ffff6206473 
17 QApplicationPrivate::notify_helper                                      qapplication.cpp           3296 0x7ffff61903f6 
18 QCoreApplication::notifyInternal2                                       qcoreapplication.cpp       1168 0x7ffff4d7bcaa 
19 QCoreApplication::sendSpontaneousEvent                                  qcoreapplication.cpp       1626 0x7ffff4d7becd 
20 QGuiApplicationPrivate::processMouseEvent                               qguiapplication.cpp        2461 0x7ffff55e58b8 
21 QWindowSystemInterface::sendWindowSystemEvents                          qwindowsysteminterface.cpp 1114 0x7ffff5648aac 
22 xcbSourceDispatch                                                       qxcbeventdispatcher.cpp    57   0x7ffff14acb9e 
23 g_main_context_dispatch_unlocked.lto_priv                                                               0x7ffff44fd28c 
24 g_main_context_iterate_unlocked.isra                                                                    0x7ffff455d7b8 
25 g_main_context_iteration                                                                                0x7ffff44fe783 
26 QEventDispatcherGlib::processEvents                                     qeventdispatcher_glib.cpp  399  0x7ffff505591e 
27 QEventLoop::exec                                                        qflags.h                   34   0x7ffff4d88fe2 
28 QCoreApplication::exec                                                  qflags.h                   74   0x7ffff4d85166 
29 main                                                                    main.cpp                   633  0x21c045       

It actually appears to crash upon hovering the separator between the views, due to trying to use the QDockWidgetGroupWindow instance as a QMainWindow, which it isn’t, but it was casted to one in QDockWidgetGroupLayout::toolBarAreaLayout in code introduced in Avoid dock widget separators stealing mouse events from expanded toolbar · qt/qtbase@3d99f90 · GitHub, so it appears to be a regression in Qt 6.8.1.

Fortunately, I found this issue was already reported as QTBUG-132952 and is already fixed for an upcoming Qt release. Until we have a Tiled build against a fixed Qt I would suggest to avoid this kind of layout.

1 Like

Good to know, thx.