Summary: | Segfault in Qt since the (at least) the xcb screen backend cannot deal with "no screen" conditions | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | stephbal1 |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | crash | CC: | ales, antornix, arpiruk, awilfox, bastian.salmela, bugzilla, carl.erwin, chatwithjim, clifford.bradbury, con.hennessy, d.d.huisman, dan, edoubrayrie, ejt000, ferrets, fgouget, fire, florian, frode, gcarmin, grgoffe, gtwilliams, gwpublic, hallerharry77, handspam, harishnavnit, hzwhuang, iskenderurs, jbarren, jeppe, kde.track.pasilli, kde, kde, kdebug2, koesterreich, L.Bonnaud, l.jirkovsky, le.trmr, leon, leonard, lindner_mail, lubos, martin+kde, Martin, michael, michael, mihai, mmar, mmbossoni, mschiff, nikadon, nsm.nikhil, ok7, oleksii.zagorskyi, pfeiffer, pmlyon, pub, rafaelalcantaraperez, rafis, rdieter, robert.munteanu, rprots, rushpl, Samuele.Kaplun, scott, serhiy.int, simhpl+kde121115, stasilevich, travneff, vivo75+kde, yves.duenow |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
See Also: |
https://bugreports.qt.io/browse/QTBUG-32973 https://bugs.kde.org/show_bug.cgi?id=345129 https://bugs.kde.org/show_bug.cgi?id=348788 https://bugs.kde.org/show_bug.cgi?id=349428 https://bugs.kde.org/show_bug.cgi?id=351007 https://bugs.kde.org/show_bug.cgi?id=351257 https://bugreports.qt.io/browse/QTBUG-47385 https://bugs.kde.org/show_bug.cgi?id=351546 https://bugreports.qt.io/browse/QTBUG-42985 https://bugs.kde.org/show_bug.cgi?id=356205 |
||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
stephbal1
2014-12-02 17:48:29 UTC
The bug is in Qt, when you change the resolution (and depending on how you do it) there might be a moment where there's no screen - and Qt5 crashes hard in this case. *** Bug 344410 has been marked as a duplicate of this bug. *** *** Bug 344984 has been marked as a duplicate of this bug. *** *** Bug 345096 has been marked as a duplicate of this bug. *** *** Bug 345207 has been marked as a duplicate of this bug. *** Thanks. For those who do not want to search for it in the QT bug: Should be fixed in QT 5.5 *** Bug 345809 has been marked as a duplicate of this bug. *** *** Bug 346005 has been marked as a duplicate of this bug. *** *** Bug 346627 has been marked as a duplicate of this bug. *** *** Bug 346685 has been marked as a duplicate of this bug. *** *** Bug 347534 has been marked as a duplicate of this bug. *** *** Bug 347927 has been marked as a duplicate of this bug. *** *** Bug 347957 has been marked as a duplicate of this bug. *** *** Bug 347990 has been marked as a duplicate of this bug. *** *** Bug 348165 has been marked as a duplicate of this bug. *** *** Bug 348217 has been marked as a duplicate of this bug. *** *** Bug 348545 has been marked as a duplicate of this bug. *** *** Bug 348623 has been marked as a duplicate of this bug. *** *** Bug 348685 has been marked as a duplicate of this bug. *** *** Bug 349174 has been marked as a duplicate of this bug. *** So, I've just updated to Qt5.5 from ArchLinux testing repositories. All of the crashes seems gone, except by one when switching from TV (1920x1080) to Monitor (1680x1050) Thread 1 (Thread 0x7f58b5461800 (LWP 1258)): [KCrash Handler] #5 0x00007f58afc14520 in QScreen::availableGeometry() const () from /usr/lib/libQt5Gui.so.5 #6 0x00007f58b4f1b54f in PlasmaQuick::Dialog::popupPosition(QQuickItem*, QSize const&) () from /usr/lib/libKF5PlasmaQuick.so.5 #7 0x00007f58b4f1cb42 in PlasmaQuick::Dialog::setVisible(bool) () from /usr/lib/libKF5PlasmaQuick.so.5 #8 0x00007f58af6bde77 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5 #9 0x00007f58af6caf38 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt5Core.so.5 #10 0x00007f58af6bee63 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5 #11 0x00007f58b0a5e00c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #12 0x00007f58b0a634e6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #13 0x00007f58af68f89b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #14 0x00007f58af6e505d in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5 #15 0x00007f58af6e5561 in ?? () from /usr/lib/libQt5Core.so.5 #16 0x00007f58ab04d9fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #17 0x00007f58ab04dce0 in ?? () from /usr/lib/libglib-2.0.so.0 #18 0x00007f58ab04dd8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #19 0x00007f58af6e623f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #20 0x00007f58af68d26a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #21 0x00007f58af69520c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #22 0x000000000042ed66 in main () Looks like a(n unrelated) bug in PlasmaQuick::Dialog, please file a new one against frameworks-plasma. QScreen::availableGeometry just returns a private member, so that class either accesses a dangeling pointer or an out of bounds array. *** Bug 350692 has been marked as a duplicate of this bug. *** *** Bug 350467 has been marked as a duplicate of this bug. *** *** Bug 350710 has been marked as a duplicate of this bug. *** *** Bug 350766 has been marked as a duplicate of this bug. *** *** Bug 350800 has been marked as a duplicate of this bug. *** *** Bug 351257 has been marked as a duplicate of this bug. *** Bug's reported as NOT fixed in 5.5 https://bugreports.qt.io/browse/QTBUG-47385 *** Bug 352712 has been marked as a duplicate of this bug. *** *** Bug 353122 has been marked as a duplicate of this bug. *** Thats one of the many variants of https://bugreports.qt.io/browse/QTBUG-42985 And no, not fixed, not even with all patches in that bug. Please report more info there, to give them a better chance to fix it and raise awareness, the kde bugtracker doesn't help for that. *** Bug 351007 has been marked as a duplicate of this bug. *** *** Bug 351546 has been marked as a duplicate of this bug. *** *** Bug 348788 has been marked as a duplicate of this bug. *** *** Bug 353823 has been marked as a duplicate of this bug. *** According to this comment https://bugreports.qt.io/browse/QTBUG-42985?focusedCommentId=294803&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-294803 "KDE developers should make sure not to 1) assume that QScreen* returned from any Qt function is guaranteed to be non-null 2) hold any QScreen pointers." - so maybe it is a KDE bug after all? > so maybe it is a KDE bug after all?
The specific case here does neither 1 nor 2. It's Qt itself crashing as they don't check 1 and 2.
Fwwi, *every* single backtrace I've seen in this regard was a Qt internal nullptr resolution. The design was changed and left tons of unconditional (primary) screen accesses in Qt behind and instead of going for the obvious and just add a dummy screen (preserving source compatibility as well), they chose to "if (QGuiApplication::primaryScreen()) { ... }" on every single occurrence. Workloading approach, but not our problem at all. Once Qt stops crashing by itself, there *might* popup KDE (and other Qt client) code issues from "QWidget * QDesktopWidget::screen(int screen = -1)", but so far, we didn't make it into client code because Qt crashed before. If we see them once, we got to fix them then. *** Bug 354387 has been marked as a duplicate of this bug. *** Is there any known workaround for this issue? I'm using KDE as my primary desktop for work and this is making life very difficult. a) Don't use Qt5 software b) Don't change the screen layout/resolution/frequency while using Qt5 software *** Bug 355118 has been marked as a duplicate of this bug. *** *** Bug 355857 has been marked as a duplicate of this bug. *** *** Bug 355882 has been marked as a duplicate of this bug. *** *** Bug 355937 has been marked as a duplicate of this bug. *** *** Bug 356107 has been marked as a duplicate of this bug. *** *** Bug 356144 has been marked as a duplicate of this bug. *** *** Bug 353578 has been marked as a duplicate of this bug. *** *** Bug 356674 has been marked as a duplicate of this bug. *** *** Bug 358605 has been marked as a duplicate of this bug. *** *** Bug 360079 has been marked as a duplicate of this bug. *** *** Bug 360337 has been marked as a duplicate of this bug. *** *** Bug 360548 has been marked as a duplicate of this bug. *** *** Bug 360684 has been marked as a duplicate of this bug. *** *** Bug 361704 has been marked as a duplicate of this bug. *** Just to make it clear here, the QT-BUG – https://bugreports.qt.io/browse/QTBUG-42985 – also refers to disappearing windows, not just crashes. From reading from the QTBUG I bet the issue is fixed in Qt 5.5.1 with patches and hopefully in 5.6. *** Bug 362350 has been marked as a duplicate of this bug. *** Is a backport possible for 16.04 ubuntu users not likely to see this in lts until 18.04? Sadly, kde4 was terrible with unfixed bugs for setting up xrandr geometry as well that made it unusable when relying on radeon modules, upgraded to 5 (and 16.04 to do so), was massively better, but affected by this now as well it seems. Going back to 4 really isn't an option being left unresolved too. I'm using 3x displays, 48" 4k samsung tv's as my desk monitors, which don't do dpms keepalive over hdmi cables it seems. Rather they shut off/down, and "go away" on the wire to the video card and xrandr, leaving it without a native display, or your "dummy display" concept it seem to keep it sane when it has none. Waking up the displays, and thus xrand + kde figuring out where to put things back to, is an entire crapshoot now whether it 1) lives perfect, 2) lives broken needing xrandr fixing, 3) needs sddm restart from different tty, or 4) needs rebooted as nothing wakes it up. Feels windoze-y now. Oddly, it doesn't always crash kwin, and sometimes recovers perfectly. Other times not so much, but its very random sadly. I've created xrandr scripts myself and with arandr to deal with it when kde5 as a whole decides to go weird, but it's also seeming to have identity issues with what is the "primary" display as well, as it seems to change upon these events which is really primary, or which primary is really linked to which monitor index. Sometimes I just have to try setting the primary monitor randomly to figure out which it thinks is currently actually display 2 for example. SDDM also has recovery issues with are likely to be related but their own beast, yet systemic of the fact no one seems to actually test kde with multiple monitors extensively. I was using kde4 happily with amd blob drivers and 6x 1080p montiors that did the setup itself for years, but using radeon now (with 4.x kernels that amd doesn't support yet for blob), which now works 2000x better, breaks this with xrandr quirks like this. This is not a bug in KDE (let alone KWin) The bug exists in every Qt 5.5 version. Older Qt versions have randr related sefaults in QtQuick (will affect plasmashell, kwin and everything else that has QML bits) and so does at least Qt 5.6.0 (unstashed by the restorage of the pre 5.5 behavior to prevent these crashes) Ubuntu could likely "backport" this in Qt - while the resolving commit is a bit bigger, the breaking one is just (afaics pretty much unmotivated other than the broken anyway QtQuick part) http://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/platforms/xcb/qxcbconnection.cpp?id=51ada7734ad780178ecced11e0dff454dfc2e5f2 *** Bug 363580 has been marked as a duplicate of this bug. *** *** Bug 364242 has been marked as a duplicate of this bug. *** *** Bug 364362 has been marked as a duplicate of this bug. *** *** Bug 364388 has been marked as a duplicate of this bug. *** *** Bug 364867 has been marked as a duplicate of this bug. *** *** Bug 365913 has been marked as a duplicate of this bug. *** *** Bug 360134 has been marked as a duplicate of this bug. *** *** Bug 348262 has been marked as a duplicate of this bug. *** *** Bug 358560 has been marked as a duplicate of this bug. *** *** Bug 351180 has been marked as a duplicate of this bug. *** *** Bug 346700 has been marked as a duplicate of this bug. *** *** Bug 339922 has been marked as a duplicate of this bug. *** *** Bug 380941 has been marked as a duplicate of this bug. *** *** Bug 359228 has been marked as a duplicate of this bug. *** *** Bug 355232 has been marked as a duplicate of this bug. *** *** Bug 360254 has been marked as a duplicate of this bug. *** *** Bug 343772 has been marked as a duplicate of this bug. *** *** Bug 345205 has been marked as a duplicate of this bug. *** *** Bug 344773 has been marked as a duplicate of this bug. *** *** Bug 343982 has been marked as a duplicate of this bug. *** *** Bug 345129 has been marked as a duplicate of this bug. *** *** Bug 362964 has been marked as a duplicate of this bug. *** *** Bug 369221 has been marked as a duplicate of this bug. *** *** Bug 366070 has been marked as a duplicate of this bug. *** *** Bug 347524 has been marked as a duplicate of this bug. *** |