Summary: | Crash in QPaintDevice::devicePixelRatio() when hitting Alt-Tab on Wayland with QT_QUICK_BACKEND=software | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Balló György <ballogyor> |
Component: | tabbox | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | crash | CC: | al.dumbrava, emppalms, nate, nickdiego |
Priority: | NOR | Keywords: | qt6 |
Version: | 6.0.1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
URL: | https://codereview.qt-project.org/c/qt/qtdeclarative/+/576193 | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/a22a8eb122bf2bb7c1e38450aa8d644f0a8ca30f | Version Fixed In: | |
Sentry Crash Report: |
Description
Balló György
2024-03-07 08:34:03 UTC
Is there a particular reason you're using "QT_QUICK_BACKEND=software"? This is not officially supported by KDE and not tested as such, so I'm not super surprised you found an issue. (In reply to Nate Graham from comment #1) > Is there a particular reason you're using "QT_QUICK_BACKEND=software"? Because the OpenGL backend of Qt Quick uses complex shaders that doesn't fit into the hardware limits of Intel's Gen3 GPUs. So the i915 driver fails to render various elements that are exceed its limits. Plasma 5 was usable with "QT_QUICK_BACKEND=software", just the window thumbnails are not rendered in that case, but everything else worked fine. Plasma 6 introduced some new issues which I reported. This affects the GPUs defined here due to Shader Model 2.0: https://invent.kde.org/plasma/kwin/-/blob/master/src/opengl/glplatform.cpp#L374-388 There is also a report for mesa: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8379 I experienced the same crash after I unset QT_QUICK_BACKEND and set KWIN_COMPOSE=Q to test the QPainter backend of KWin. Thanks for the context, that's helpful. Feel free to re-open the other bug reports of yours that I closed, but please change the titles to mention that you're forcing software rendering. Thanks again. (In reply to Nate Graham from comment #4) > Thanks for the context, that's helpful. Feel free to re-open the other bug > reports of yours that I closed, but please change the titles to mention that > you're forcing software rendering. Thanks again. I can't reopen this bug, because I don't have rights: https://bugs.kde.org/show_bug.cgi?id=482669 *** Bug 484101 has been marked as a duplicate of this bug. *** Are there reasonable alternatives to `QT_QUICK_BACKEND=software` we might use as a temporary workaround? (In reply to Cannon Palms from comment #7) > Are there reasonable alternatives to `QT_QUICK_BACKEND=software` we might > use as a temporary workaround? You could try KWIN_COMPOSE=O2 or KWIN_COMPOSE=O2ES environment variables to force KWin to use the OpenGL compositor. If it doesn't help, then you could try MESA_LOADER_DRIVER_OVERRIDE='' to force Mesa to fall back to LLVMpipe. Of course another option is to use the X11 session instead of Wayland. I recently upgraded my packages (a lot of k packages going from 24.02.0-1 -> 24.02.1-1) and started experiencing this bug. I did NOT set `QT_QUICK_BACKEND=software` in my environment file. I also noticed that my taskbar icons jump to the left as in bug 482669 after the update. My coredump also lists Qt6Quick so my assumption is that something from the update made my system start using QT_QUICK which causes this crash to happen. I have yet to try the flags mentioned in Comment 8, but I thought I'd add a "me too" to this bug. *** Bug 487106 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5825 Git commit 8c149bb6b711c00e0fa3cf2f3d06a09dcc57a1e4 by David Edmundson. Committed on 04/06/2024 at 08:33. Pushed by davidedmundson into branch 'master'. effects: Do not call RHI QQuickRenderControl methods when using software rendering As per the docs: Note: This function does not need to be, and must not be, called when using the software adaptation of Qt Quick. This sets up RHI on the render control, which in turn sets RHI on the window, which shouldn't exist when using software rendering. Related: bug 486078 M +7 -3 src/effect/offscreenquickview.cpp https://invent.kde.org/plasma/kwin/-/commit/8c149bb6b711c00e0fa3cf2f3d06a09dcc57a1e4 Git commit a22a8eb122bf2bb7c1e38450aa8d644f0a8ca30f by David Edmundson, on behalf of David Edmundson. Committed on 04/06/2024 at 08:36. Pushed by davidedmundson into branch 'Plasma/6.1'. effects: Do not call RHI QQuickRenderControl methods when using software rendering As per the docs: Note: This function does not need to be, and must not be, called when using the software adaptation of Qt Quick. This sets up RHI on the render control, which in turn sets RHI on the window, which shouldn't exist when using software rendering. Related: bug 486078 (cherry picked from commit 8c149bb6b711c00e0fa3cf2f3d06a09dcc57a1e4) a6826049 effects: Do not call RHI QQuickRenderControl methods when using software rendering Co-authored-by: David Edmundson <kde@davidedmundson.co.uk> M +7 -3 src/effect/offscreenquickview.cpp https://invent.kde.org/plasma/kwin/-/commit/a22a8eb122bf2bb7c1e38450aa8d644f0a8ca30f I tested with KWin 6.1.0, but unfortunately it does not fixed. I still got this backtrace: #0 0x000079796dc7aea2 in QPaintDevice::devicePixelRatio (this=0x62521df8f0c8) at /usr/include/qt6/QtGui/qpaintdevice.h:49 #1 QSGSoftwareRenderer::render (this=0x62521df1f8b0) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp:77 #2 0x000079796dca6b93 in QSGRenderer::renderScene (this=0x62521df1f8b0) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/coreapi/qsgrenderer.cpp:143 #3 0x000079796dc4cffd in QQuickWindowPrivate::renderSceneGraph (this=0x62521ca52980) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/items/qquickwindow.cpp:682 #4 0x000079796dc7c2de in QSGSoftwareRenderLoop::renderWindow (this=this@entry=0x62521dc77b60, window=<optimized out>, window@entry=0x62521ddbaf80, isNewExpose=isNewExpose@entry=true) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp:142 #5 0x000079796dc7ca21 in QSGSoftwareRenderLoop::exposureChanged (this=0x62521dc77b60, window=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp:196 #6 0x000079796c1def4c in QWindow::event (this=0x62521ddbaf80, ev=0x7fff793d2000) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindow.cpp:2600 #7 0x000079796ccfc51c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x62521ddbaf80, e=0x7fff793d2000) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3287 #8 0x000079796bb44d28 in QCoreApplication::notifyInternal2 (receiver=0x62521ddbaf80, event=0x7fff793d2000) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1142 #9 0x000079796bb44d7d in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1597 #10 0x000079796c185814 in QGuiApplicationPrivate::processExposeEvent (e=0x62521dece420) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qguiapplication.cpp:3298 #11 0x000079796c1e5d64 in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1114 #12 0x000079796c69c0e7 in QWindowSystemInterface::flushWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) [clone .constprop.0] (flags=...) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1083 #13 0x0000797947f0dd79 in non-virtual thunk to PlasmaQuick::Dialog::componentComplete() () at /usr/src/debug/libplasma/libplasma-6.1.0/src/plasmaquick/dialog.h:254 #14 0x000079796d6e46f3 in QQmlObjectCreator::finalize (this=0x62521db93030, interrupt=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1567 #15 0x000079796d6b9657 in QQmlIncubatorPrivate::incubate (this=this@entry=0x62521dcf4830, i=...) at /usr/include/qt6/QtCore/qscopedpointer.h:90 #16 0x000079796d6ba068 in QQmlEnginePrivate::incubate (this=0x62521cb16aa0, i=..., forContext=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlincubator.cpp:53 #17 0x000079796abd4419 in QQmlDelegateModelPrivate::object (this=0x797940008310, group=QQmlListCompositor::Default, index=0, incubationMode=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qmlmodels/qqmldelegatemodel.cpp:1284 #18 0x000079796ab9cefc in QQmlInstantiatorPrivate::regenerate (this=0x62521c8240b0) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qmlmodels/qqmlinstantiator.cpp:56 #19 0x000079796d64a8f3 in QQmlPropertyData::writeProperty (this=<optimized out>, target=<optimized out>, value=<optimized out>, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlpropertydata_p.h:336 #20 0x000079796d663a88 in GenericBinding<1>::doStore<bool> (this=<optimized out>, value=<optimized out>, pd=<optimized out>, flags=...) at /usr/include/qt6/QtCore/qtaggedpointer.h:120 #21 GenericBinding<1>::write (this=<optimized out>, result=..., isUndefined=<optimized out>, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlbinding.cpp:236 #22 0x000079796d65f8ed in QQmlBinding::doUpdate (this=0x62521ddcf760, watcher=..., flags=..., scope=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlbinding.cpp:701 #23 0x000079796d65ec9e in QQmlBinding::update (this=0x62521ddcf760, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlbinding.cpp:164 #24 0x000079796d6dba4c in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x0) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlnotifier.cpp:70 --Type <RET> for more, q to quit, c to continue without paging--c #25 0x000079796bba144a in doActivate<false> (sender=0x62521d65f830, signal_index=3, argv=0x0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:3976 #26 0x000079796e7241d9 in KWin::TabBox::SwitcherItem::visibleChanged (this=0x62521d65f830) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_switcheritem.cpp:347 #27 KWin::TabBox::SwitcherItem::setVisible (this=0x62521d65f830, visible=true) at /usr/src/debug/kwin/kwin-6.1.0/src/tabbox/switcheritem.cpp:69 #28 KWin::TabBox::TabBoxHandlerPrivate::show (this=0x62521ca6dea0) at /usr/src/debug/kwin/kwin-6.1.0/src/tabbox/tabboxhandler.cpp:310 #29 KWin::TabBox::TabBoxHandler::show (this=0x62521cb73200) at /usr/src/debug/kwin/kwin-6.1.0/src/tabbox/tabboxhandler.cpp:358 #30 KWin::TabBox::TabBox::show (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.1.0/src/tabbox/tabbox.cpp:487 #31 KWin::TabBox::TabBox::show (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.1.0/src/tabbox/tabbox.cpp:477 #32 0x000079796bba16f7 in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=<optimized out>, a=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:469 #33 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4086 #34 0x000079796bba9885 in QTimer::timeout (this=0x62521ca7a938, _t1=...) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qtimer.cpp:224 #35 QTimer::timerEvent (e=<optimized out>, this=0x62521ca7a938) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:258 #36 QTimer::timerEvent (this=0x62521ca7a938, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:252 #37 0x000079796bb8bfc9 in QObject::event (this=0x62521ca7a938, e=0x7fff793d4550) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1427 #38 0x000079796ccfc51c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x62521ca7a938, e=0x7fff793d4550) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3287 #39 0x000079796bb44d28 in QCoreApplication::notifyInternal2 (receiver=0x62521ca7a938, event=0x7fff793d4550) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1142 #40 0x000079796bcc3c98 in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7fff793d4550) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1583 #41 QTimerInfoList::activateTimers (this=this@entry=0x62521c7ac538) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimerinfo_unix.cpp:434 #42 0x000079796bcc6368 in QEventDispatcherUNIXPrivate::activateTimers (this=0x62521c7ac460) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:196 #43 QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=..., flags@entry=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:472 #44 0x000079796c5f9693 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at /usr/src/debug/qt6-base/qtbase/src/gui/platform/unix/qunixeventdispatcher.cpp:27 #45 0x000079796bb4f01e in QEventLoop::processEvents (this=0x7fff793d4740, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:100 #46 QEventLoop::exec (this=0x7fff793d4740, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:182 #47 0x000079796bb4934d in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:74 #48 0x000079796ccf83ba in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2555 #49 0x00006251e39ba069 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin/kwin-6.1.0/src/main_wayland.cpp:639 What does it think your devicepixelratio is? (In reply to Nate Graham from comment #15) > What does it think your devicepixelratio is? How can I query it? The crash happens both on a virtual machine and on a real system. I was hoping you could find out by using gdb on that backtrace, since it looked like you knew your way around it. It's an upstream bug I confirm that it was fixed. I cannot reproduce it anymore with KWin 6.2.4 and Qt 6.8.1. |