Created attachment 105720 [details] crash backtrace Starting with Qt 5.9 (current git head), plasmashell crashes on startup. I tested with KDE Frameworks 5.34 and git master as well as Plasma 5.9.5, 5.9.95 and git master. The crash is always the same. So far, every other KDE application runs just fine (including KWin), it is just Plasma that is acting up. My system is Gentoo x86_64 (~amd64) w/ gcc 6.3.0, nvidia drivers 381.22 (GTX 1080), glibc 2.24, Xorg 1.19.3, Mesa 17.1.0 and Qt 5.9 (git head). I have attached a complete backtrace of the crash which is 100% reproducible. I am pretty much at my wit's end right now since I tried to track this down myself but this hasn't lead my anywhere thus far. :-( Please let me know if there is anything, anything at all, which I can do to help fix and/or locate this bug. Thanks a lot.
Using Qt 5.9-beta4 here, and do not see a crash. If this is indeed a recent regression, a git bisect should find the offending commit.
I can reproduce it as well. Crash on startup, a showstopper. Raising priority even though it's probably an upstream bug.
With Qt git head, you have probably mixing 5.9.0 and 5.9.1 Qt libs installed. (I had the same mistake) Suggestion: Try rebuild *all* installed dev-qt/*:5 packages. I have here currently on Gentoo Qt dev-qt/*-5.9.0.9999 (Qt 5.9.0 git master) running, it works fine with current plasma 5.9.5 and current 5.10.49.9999 (5.10 git master).
I unsuccefully tried to bisect it in qtdeclarative. The bug does not seem to be caused or triggered by any change between qtdeclarative v5.9.0-beta4 and current 5.9, commit df30d90eadcd92eebb4bf79f3eb251bc58d25d09 at the time of writing. H.d.V.: I have everything up to date on the 5.9 branch. Did they screw up the version numbers again? But even then, the only thing that is allowed to blow up is using different patch versions of libraries from the *same* module (I have had that once - there is no rule against it).
Can reproduce. On the time the texture is null, the image is also null. m_frameSvg->frameSvg()->image(size, elementId); That should still create a valid QSGTexture though. Or at least did.
And knowing that, here's the obvious cause: commit e6acf80136db9f667d0d4664f6c68065355d6811 Author: Mitch Curtis <mitch.curtis@qt.io> Date: Sat May 6 22:32:57 2017 +0200 QQuickWindow::createTextureFromImage(): return nullptr for null images Change-Id: Idf3315be104e058315d82893443e1c27d1d79f2e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Bleh.
Haha, thanks for finding it. That commit does seem dubious in a library that is supposed to stay binary compatible. If a user really cared, they could check nullness of the image themselves. I've reverted that commit for now and my desktop works again. I'll leave it to someone who knows more about the details to mark this as upstream. Maybe the new behavior of Qt is reasonable after all?
Qt docs do say "Warning: This function will return 0 if the scene graph has not yet been initialized."
>Qt docs do say "Warning: This function will return 0 if the scene graph has not yet been initialized." That's something different. We're not calling it before a QQuickItem::updateNode so we know the scene graph is initialized. As for if we guard against it and check the images. Sort of, but you can't do QSGGeometryNode::setTexture(0) which means we can't unset one of the tiles in the 9-tile frame. So if you did guard it, you'd just leave a piece of the old frame there instead when we changed to a Frame that had some null images. The only correct solution is to delete the nodes as appropriate, but that requires a huge refactor and significantly more complex code.
I left a comment on the relevant Qt change asking for some rationale of why they did this.
pasting inline Thread 10 (Thread 0x7fff2a337700 (LWP 1724)): #0 QSGSimpleTextureNode::setTexture (this=0x7fff1c204e70, texture=0x0) at /usr/src/debug/dev-qt/qtdeclarative-5.9.9999/qtdeclarative-5.9.9999/src/quick/scenegraph/util/qsgsimpletexturenode.cpp:251 #1 0x00007fff46ede39a in Plasma::FrameItemNode::updateTexture (elementId="normal-center", size=..., this=0x7fff1c204e70) at /var/tmp/portage/kde-frameworks/plasma-9999/work/plasma-9999/src/declarativeimports/core/framesvgitem.cpp:131 #2 Plasma::FrameItemNode::reposition (fullSize=..., frameGeometry=..., this=0x7fff1c204e70) at /var/tmp/portage/kde-frameworks/plasma-9999/work/plasma-9999/src/declarativeimports/core/framesvgitem.cpp:163 #3 Plasma::FrameSvgItem::updatePaintNode (this=<optimized out>, oldNode=<optimized out>) at /var/tmp/portage/kde-frameworks/plasma-9999/work/plasma-9999/src/declarativeimports/core/framesvgitem.cpp:502 #4 0x00007ffff5e7c028 in QQuickWindowPrivate::updateDirtyNode (this=this@entry=0x1009630, item=item@entry=0x1140b80) at /usr/src/debug/dev-qt/qtdeclarative-5.9.9999/qtdeclarative-5.9.9999/src/quick/items/qquickwindow.cpp:3181 #5 0x00007ffff5e7c77d in QQuickWindowPrivate::updateDirtyNodes (this=this@entry=0x1009630) at /usr/src/debug/dev-qt/qtdeclarative-5.9.9999/qtdeclarative-5.9.9999/src/quick/items/qquickwindow.cpp:2926 #6 0x00007ffff5e7d9a2 in QQuickWindowPrivate::syncSceneGraph (this=this@entry=0x1009630) at /usr/src/debug/dev-qt/qtdeclarative-5.9.9999/qtdeclarative-5.9.9999/src/quick/items/qquickwindow.cpp:420 #7 0x00007ffff5e27b05 in QSGRenderThread::sync (this=this@entry=0x18d1640, inExpose=<optimized out>) at /usr/src/debug/dev-qt/qtdeclarative-5.9.9999/qtdeclarative-5.9.9999/src/quick/scenegraph/qsgthreadedrenderloop.cpp:554 #8 0x00007ffff5e2972c in QSGRenderThread::syncAndRender (this=this@entry=0x18d1640) at /usr/src/debug/dev-qt/qtdeclarative-5.9.9999/qtdeclarative-5.9.9999/src/quick/scenegraph/qsgthreadedrenderloop.cpp:600 #9 0x00007ffff5e2d734 in QSGRenderThread::run (this=0x18d1640) at /usr/src/debug/dev-qt/qtdeclarative-5.9.9999/qtdeclarative-5.9.9999/src/quick/scenegraph/qsgthreadedrenderloop.cpp:720 #10 0x00007ffff2e6f391 in QThreadPrivate::start (arg=0x18d1640) at /usr/src/debug/dev-qt/qtcore-5.9.9999/qtcore-5.9.9999/src/corelib/thread/qthread_unix.cpp:368 #11 0x00007ffff1cde374 in start_thread (arg=0x7fff2a337700) at pthread_create.c:333 #12 0x00007ffff2719b2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
https://bugreports.qt.io/browse/QTBUG-61083
Fixed in qt