microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
9.9k stars 296 forks source link

Crash when resizing Qt application #1183

Open aytey opened 5 months ago

aytey commented 5 months ago

Windows build number:

10.0.22631.0

Your Distribution version:

22.04

Your WSL versions:

WSL version: 2.0.9.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22631.3007

Steps to reproduce:

  1. Open-up our propertiary Qt-based application
  2. Open-up a specific view inside of this application (e.g., one that uses tables)
  3. Attempt to resize the window
  4. Application abnormally terminates

WSL logs:

pulseaudio.log stderr.log versions.txt weston.log wlog.log

Expected behavior:

I've tried this on a number of other X11 servers (e.g., VcXsrv, Moba, Exceed) and I don't see this crash, so it does seem unique to WSLg.

Actual behavior:

Here's a backtrace from gdb showing what happens when the application crashes:

#0  __GI_exit (status=1) at ./stdlib/exit.c:142
#1  0x00007ffff4bb17f8 in ?? () from /home/avj/vc24/lib64/libQtGui.so.4
#2  0x00007fffee501393 in _XIOError () from /lib/x86_64-linux-gnu/libX11.so.6
#3  0x00007fffee504c95 in _XEventsQueued () from /lib/x86_64-linux-gnu/libX11.so.6
#4  0x00007fffee504f5d in _XGetRequest () from /lib/x86_64-linux-gnu/libX11.so.6
#5  0x00007fffee4df223 in XDrawLine () from /lib/x86_64-linux-gnu/libX11.so.6
#6  0x00007ffff4d1c2c9 in QX11PaintEngine::drawLines(QLine const*, int) () from /home/avj/vc24/lib64/libQtGui.so.4
#7  0x00007ffff4c7b2a6 in QPainter::drawLines(QLine const*, int) () from /home/avj/vc24/lib64/libQtGui.so.4
#8  0x00007ffff4e6c26b in QCleanlooksStyle::drawPrimitive(QStyle::PrimitiveElement, QStyleOption const*, QPainter*, QWidget const*) const () from /home/avj/vc24/lib64/libQtGui.so.4
#9  0x00007ffff4f2066a in QToolBar::paintEvent(QPaintEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#10 0x00007ffff4b997ae in QWidget::event(QEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#11 0x00007ffff4f21923 in QToolBar::event(QEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#12 0x00007ffff4b5892c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#13 0x00007ffff4b5ab15 in QApplication::notify(QObject*, QEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#14 0x00007fffef51751e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /home/avj/vc24/lib64/libQtCore.so.4
#15 0x00007ffff4b9daa3 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/avj/vc24/lib64/libQtGui.so.4
#16 0x00007ffff4b9e36b in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/avj/vc24/lib64/libQtGui.so.4
#17 0x00007ffff4b9e25b in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/avj/vc24/lib64/libQtGui.so.4
#18 0x00007ffff4b9e25b in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/avj/vc24/lib64/libQtGui.so.4
#19 0x00007ffff4b9d5e6 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/avj/vc24/lib64/libQtGui.so.4
#20 0x00007ffff4d2f7dc in QWidgetBackingStore::sync() () from /home/avj/vc24/lib64/libQtGui.so.4
#21 0x00007ffff4b8fe52 in QWidgetPrivate::syncBackingStore() () from /home/avj/vc24/lib64/libQtGui.so.4
#22 0x00007ffff4b99721 in QWidget::event(QEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#23 0x00007ffff4ed4bbb in QMainWindow::event(QEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#24 0x00007ffff4b5892c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#25 0x00007ffff4b5ab15 in QApplication::notify(QObject*, QEvent*) () from /home/avj/vc24/lib64/libQtGui.so.4
#26 0x00007fffef51751e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /home/avj/vc24/lib64/libQtCore.so.4
#27 0x00007fffef51a14a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /home/avj/vc24/lib64/libQtCore.so.4
#28 0x00007ffff4be0829 in QEventDispatcherX11::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/avj/vc24/lib64/libQtGui.so.4
#29 0x00007fffef51645f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/avj/vc24/lib64/libQtCore.so.4
#30 0x00007fffef5166f8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/avj/vc24/lib64/libQtCore.so.4
#31 0x00007fffef51a93b in QCoreApplication::exec() () from /home/avj/vc24/lib64/libQtCore.so.4
#32 0x00000000006b7d9a in ?? ()
#33 0x000000000063706b in ?? ()
#34 0x00007fffeec17d90 in __libc_start_call_main (main=main@entry=0x637060, argc=argc@entry=1, argv=argv@entry=0x7fffffffe3e8) at ../sysdeps/nptl/libc_start_call_main.h:58
#35 0x00007fffeec17e40 in __libc_start_main_impl (main=0x637060, argc=1, argv=0x7fffffffe3e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe3d8) at ../csu/libc-start.c:392
#36 0x0000000000655e79 in ?? ()
#37 0x00007fffffffe3d8 in ?? ()
#38 0x000000000000001c in ?? ()
#39 0x0000000000000001 in ?? ()
#40 0x00007fffffffe65e in ?? ()
#41 0x0000000000000000 in ?? ()
aytey commented 5 months ago

Some other notes:

aytey commented 5 months ago

I updated WSL via https://github.com/microsoft/WSL/releases (as per the issue template):

WSL version: 2.1.0.0
Kernel version: 5.15.137.3-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3007

Still reproduces.