https://bugs.kde.org/show_bug.cgi?id=424425
Bug ID: 424425 Summary: Crash when connecting a display Product: kwin Version: git master Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kwin-bugs-n...@kde.org Reporter: aleix...@kde.org Target Milestone: --- I've been doing some investigation, it seems to fail when creating screen edges. I added myself some asserts to understand it a bit better. It's crashing/asserting because it's trying to create a negative screen edge. warning: Unexpected size of section `.reg-xstate/599' in core file. #0 0x00007f03ac47f355 in raise () from /usr/lib/libc.so.6 [Current thread is 1 (Thread 0x7f03a8991d80 (LWP 599))] (gdb) where #0 0x00007f03ac47f355 in raise () at /usr/lib/libc.so.6 #1 0x00007f03ac46890b in abort () at /usr/lib/libc.so.6 #2 0x00007f03acb37c51 in qt_message_fatal (message=<synthetic pointer>..., context=...) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/global/qlogging.cpp:1914 #3 QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7fff7fe3b088, msg=msg@entry=0x7f03ace35ea0 "ASSERT: \"%s\" in file %s, line %d") at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/global/qlogging.cpp:893 #4 0x00007f03acb3704a in qt_assert(char const*, char const*, int) (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/global/qlogging.h:90 #5 0x00007f03b02a2dc7 in KWin::SwipeGesture::setStartGeometry(QRect const&) (this=0x55c3ca221860, geometry=...) at ../gestures.cpp:50 #6 0x00007f03b0377eef in KWin::Edge::setGeometry(QRect const&) (this=0x55c3c9f96f40, geometry=...) at ../screenedge.cpp:529 #7 0x00007f03b037ab30 in KWin::ScreenEdges::createEdge(KWin::ElectricBorder, int, int, int, int, bool) (this=0x55c3c8037dd0, border=KWin::ElectricTop, x=55, y=1080, width=-54, height=1, createAction=true) at ../screenedge.cpp:1114 #8 0x00007f03b037a8ed in KWin::ScreenEdges::createHorizontalEdge(KWin::ElectricBorder, QRect const&, QRect const&) (this=0x55c3c8037dd0, border=KWin::ElectricTop, screen=..., fullArea=...) at ../screenedge.cpp:1103 #9 0x00007f03b037953a in KWin::ScreenEdges::recreateEdges() (this=0x55c3c8037dd0) at ../screenedge.cpp:1021 #10 0x00007f03b044a1a6 in KWin::Workspace::desktopResized() (this=0x55c3c837c150) at ../workspace.cpp:1943 #11 0x00007f03b019f559 in KWin::Workspace::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55c3c837c150, _c=QMetaObject::InvokeMetaMethod, _id=66, _a=0x7fff7fe3b520) at kwin_autogen/EWIEGA46WW/moc_workspace.cpp:427 #12 0x00007f03acd8af40 in doActivate<false>(QObject*, int, void**) (sender=0x55c3c8171e70, signal_index=4, argv=0x7fff7fe3b520) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:395 #13 0x00007f03b018c728 in KWin::Screens::changed() (this=0x55c3c8171e70) at kwin_autogen/EWIEGA46WW/moc_screens.cpp:277 #14 0x00007f03b01dfb41 in KWin::AbstractWaylandOutput::applyChanges(KWaylandServer::OutputChangeSet const*) (this=0x55c3c816a400, changeSet=0x55c3ca8939a0) at ../abstract_wayland_output.cpp:205 #15 0x00007f03b032d819 in KWin::Platform::requestOutputsChange(KWaylandServer::OutputConfigurationInterface*) (this=0x55c3c8011c80, config=0x55c3ca033360) at ../platform.cpp:150 #16 0x00007f03b0426dc9 in KWin::WaylandServer::init(QByteArray const&, QFlags<KWin::WaylandServer::InitializationFlag>)::$_11::operator()(KWaylandServer::OutputConfigurationInterface*) const (this=0x55c3c80527f0, config=0x55c3ca033360) at ../wayland_server.cpp:556 #17 0x00007f03b0426d61 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KWaylandServer::OutputConfigurationInterface*>, void, KWin::WaylandServer::init(QByteArray const&, QFlags<KWin::WaylandServer::InitializationFlag>)::$_11>::call(KWin::WaylandServer::init(QByteArray const&, QFlags<KWin::WaylandServer::InitializationFlag>)::$_11&, void**) (f=..., arg=0x7fff7fe3ba90) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:146 #18 0x00007f03b0426d21 in QtPrivate::Functor<KWin::WaylandServer::init(QByteArray const&, QFlags<KWin::WaylandServer::InitializationFlag>)::$_11, 1>::call<QtPrivate::List<KWaylandServer::OutputConfigurationInterface*>, void>(KWin::WaylandServer::init(QByteArray const&, QFlags<KWin::WaylandServer::InitializationFlag>)::$_11&, void*, void**) (f=..., arg=0x7fff7fe3ba90) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:256 #19 0x00007f03b0426ccc in QtPrivate::QFunctorSlotObject<KWin::WaylandServer::init(QByteArray const&, QFlags<KWin::WaylandServer::InitializationFlag>)::$_11, 1, QtPrivate::List<KWaylandServer::OutputConfigurationInterface*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x55c3c80527e0, r=0x55c3c7fe5020, a=0x7fff7fe3ba90, ret=0x0) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:443 #20 0x00007f03acd8af06 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff7fe3ba90, r=0x55c3c7fe5020, this=0x55c3c80527e0) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398 #21 doActivate<false>(QObject*, int, void**) (sender=0x55c3c80526a0, signal_index=4, argv=0x7fff7fe3ba90) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886 #22 0x00007f03ae1be2a3 in KWaylandServer::OutputManagementInterface::configurationChangeRequested(KWaylandServer::OutputConfigurationInterface*) (this=0x55c3c80526a0, _t1=0x55c3ca033360) at src/server/KWaylandServer_autogen/EWIEGA46WW/moc_outputmanagement_interface.cpp:136 #23 0x00007f03ae21ec05 in KWaylandServer::OutputConfigurationInterface::Private::emitConfigurationChangeRequested() const (this=0x55c3c9f4bdb0) at ../src/server/outputconfiguration_interface.cpp:243 #24 0x00007f03ae21e45e in KWaylandServer::OutputConfigurationInterface::Private::applyCallback(wl_client*, wl_resource*) (client=0x55c3c9bda3b0, resource=0x55c3c9a3cc30) at ../src/server/outputconfiguration_interface.cpp:201 #25 0x00007f03a8f4aa8d in () at /usr/lib/libffi.so.7 #26 0x00007f03a8f4a01b in () at /usr/lib/libffi.so.7 #27 0x00007f03ab9c6f62 in () at /usr/lib/libwayland-server.so.0 #28 0x00007f03ab9c32dc in () at /usr/lib/libwayland-server.so.0 #29 0x00007f03ab9c4faa in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0 #30 0x00007f03ae1e8a0e in KWaylandServer::Display::Private::dispatch() (this=0x55c3c8032c50) at ../src/server/display.cpp:134 #31 0x00007f03ae1ef6b8 in KWaylandServer::Display::Private::installSocketNotifier()::$_0::operator()() const (this=0x55c3c8bf8d50) at ../src/server/display.cpp:103 #32 0x00007f03ae1ef666 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWaylandServer::Display::Private::installSocketNotifier()::$_0>::call(KWaylandServer::Display::Private::installSocketNotifier()::$_0&, void**) (f=..., arg=0x7fff7fe3c2c0) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:146 #33 0x00007f03ae1ef631 in QtPrivate::Functor<KWaylandServer::Display::Private::installSocketNotifier()::$_0, 0>::call<QtPrivate::List<>, void>(KWaylandServer::Display::Private::installSocketNotifier()::$_0&, void*, void**) (f=..., arg=0x7fff7fe3c2c0) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:256 #34 0x00007f03ae1ef5dc in QtPrivate::QFunctorSlotObject<KWaylandServer::Display::Private::installSocketNotifier()::$_0, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x55c3c8bf8d40, r=0x55c3c8032b30, a=0x7fff7fe3c2c0, ret=0x0) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:443 #35 0x00007f03acd8af06 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff7fe3c2c0, r=0x55c3c8032b30, this=0x55c3c8bf8d40) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398 #36 doActivate<false>(QObject*, int, void**) (sender=0x55c3c8bf8e80, signal_index=3, argv=argv@entry=0x7fff7fe3c2c0) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886 #37 0x00007f03acd84260 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x55c3c8bf8e80, m=m@entry=0x7f03ad023b00 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff7fe3c2c0) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3946 #38 0x00007f03acd8e33f in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=this@entry=0x55c3c8bf8e80, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178 #39 0x00007f03acd8eb3b in QSocketNotifier::event(QEvent*) (this=0x55c3c8bf8e80, e=0x7fff7fe3c3d0) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qsocketnotifier.cpp:302 #40 0x00007f03ad86811f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55c3c8bf8e80, e=0x7fff7fe3c3d0) at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3671 #41 0x00007f03acd54a3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55c3c8bf8e80, event=0x7fff7fe3c3d0) at ../../include/QtCore/5.15.0/QtCore/private/../../../../../../../../devel/frameworks/qt5/qtbase/src/corelib/thread/qthread_p.h:325 #42 0x00007f03acda91eb in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x55c3c7ff1a60) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:304 #43 0x00007f03acda964b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:511 #44 0x00007f03a841228d in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at /home/apol/devel/frameworks/qt5/qtbase/src/platformsupport/eventdispatchers/qunixeventdispatcher.cpp:63 #45 0x00007f03acd533fb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff7fe3c560, flags=..., flags@entry=...) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/global/qflags.h:141 #46 0x00007f03acd5b660 in QCoreApplication::exec() () at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/global/qflags.h:121 #47 0x000055c3c7940a1f in main(int, char**) (argc=3, argv=0x7fff7fe3cf38) at ../main_wayland.cpp:711 (gdb) frame 5 #5 0x00007f03b02a2dc7 in KWin::SwipeGesture::setStartGeometry (this=0x55c3ca221860, geometry=...) at ../gestures.cpp:50 50 Q_ASSERT(m_maximumX >= m_minimumX); (gdb) p m_maximumX $1 = 1 (gdb) p m_minimumX $2 = 55 (gdb) p m_geometry No symbol "m_geometry" in current context. (gdb) up #6 0x00007f03b0377eef in KWin::Edge::setGeometry (this=0x55c3c9f96f40, geometry=...) at ../screenedge.cpp:529 529 m_gesture->setStartGeometry(m_geometry); (gdb) p m_geometry $3 = {x1 = 55, y1 = 1080, x2 = 0, y2 = 1080} (gdb) down #5 0x00007f03b02a2dc7 in KWin::SwipeGesture::setStartGeometry (this=0x55c3ca221860, geometry=...) at ../gestures.cpp:50 50 Q_ASSERT(m_maximumX >= m_minimumX); (gdb) p geometry $4 = (const QRect &) @0x55c3c9f96f68: {x1 = 55, y1 = 1080, x2 = 0, y2 = 1080} (gdb) p geometry.width() You can't do that without a process to debug. (gdb) up #6 0x00007f03b0377eef in KWin::Edge::setGeometry (this=0x55c3c9f96f40, geometry=...) at ../screenedge.cpp:529 529 m_gesture->setStartGeometry(m_geometry); (gdb) p width $5 = -164 (gdb) up #7 0x00007f03b037ab30 in KWin::ScreenEdges::createEdge (this=0x55c3c8037dd0, border=KWin::ElectricTop, x=55, y=1080, width=-54, height=1, createAction=true) at ../screenedge.cpp:1114 1114 edge->setGeometry(QRect(x, y, width, height)); (gdb) p width $6 = -54 (gdb) p width $7 = -54 (gdb) up #8 0x00007f03b037a8ed in KWin::ScreenEdges::createHorizontalEdge (this=0x55c3c8037dd0, border=KWin::ElectricTop, screen=..., fullArea=...) at ../screenedge.cpp:1103 1103 m_edges << createEdge(border, x, y, width, 1); (gdb) p width $8 = -54 (gdb) p screen $9 = (const QRect &) @0x55c3c99a1fc8: {x1 = 0, y1 = 1080, x2 = 0, y2 = 1439} (gdb) p fullArea $10 = (const QRect &) @0x7fff7fe3b3d0: {x1 = 0, y1 = 0, x2 = 2559, y2 = 2159} (gdb) p m_cornerOffset $11 = 55 (gdb) p screen $12 = (const QRect &) @0x55c3c99a1fc8: {x1 = 0, y1 = 1080, x2 = 0, y2 = 1439} (gdb) up #9 0x00007f03b037953a in KWin::ScreenEdges::recreateEdges (this=0x55c3c8037dd0) at ../screenedge.cpp:1021 1021 createHorizontalEdge(ElectricTop, screenPart, fullArea); (gdb) p screenPart $13 = (const QRect &) @0x55c3c99a1fc8: {x1 = 0, y1 = 1080, x2 = 0, y2 = 1439} (gdb) p screeb No symbol "screeb" in current context. (gdb) p screen $14 = {d = 0x55c3ca20ac40, static shared_empty = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, qt_rgn = 0x7f03ad6f40c0 <qrp>}} (gdb) p i $15 = 1 (gdb) p screen $16 = {d = 0x55c3ca20ac40, static shared_empty = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, qt_rgn = 0x7f03ad6f40c0 <qrp>}} (gdb) p screenPart $17 = (const QRect &) @0x55c3c99a1fc8: {x1 = 0, y1 = 1080, x2 = 0, y2 = 1439} EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.