<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>424694</bug_id>
          
          <creation_ts>2020-07-26 20:01:53 +0000</creation_ts>
          <short_desc>kwin_wayland crashes when enabling monitor</short_desc>
          <delta_ts>2022-02-18 04:59:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>kwin</product>
          <component>wayland-generic</component>
          <version>git master</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=450501</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nicolas Fella">nicolas.fella</reporter>
          <assigned_to name="KWin default assignee">kwin-bugs-null</assigned_to>
          <cc>kde</cc>
    
    <cc>nate</cc>
    
    <cc>slawek</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1946486</commentid>
    <comment_count>0</comment_count>
    <who name="Nicolas Fella">nicolas.fella</who>
    <bug_when>2020-07-26 20:01:53 +0000</bug_when>
    <thetext>SUMMARY

I have two monitors of which one is disabled. When I enable it in the KScreen KCM and apply kwin crashes.

KDE stuff from master, Qt from 5.15 branch

#0  0x00007f052aed2355 in raise () at /usr/lib/libc.so.6
#1  0x00007f052aebb853 in abort () at /usr/lib/libc.so.6
#2  0x00007f052af15878 in __libc_message () at /usr/lib/libc.so.6
#3  0x00007f052af1cd3a in  () at /usr/lib/libc.so.6
#4  0x00007f052af1df74 in _int_free () at /usr/lib/libc.so.6
#5  0x00007f052ee94ada in QtPrivate::QSlotObject&lt;void (KWin::XdgToplevelClient::*)(), QtPrivate::List&lt;&gt;, void&gt;::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=0, this_=0x55ecc4809aa0, r=0x0, a=0x0, ret=0x0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:415
#6  0x00007f052b7ddfb1 in QtPrivate::QSlotObjectBase::destroyIfLastRef() (this=&lt;optimized out&gt;) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#7  QtPrivate::QSlotObjectBase::destroyIfLastRef() (this=&lt;optimized out&gt;) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#8  QObject::~QObject() (this=&lt;optimized out&gt;, __in_chrg=&lt;optimized out&gt;) at kernel/qobject.cpp:1068
#9  0x00007f052edf5912 in KWin::Toplevel::~Toplevel() (this=0x55ecc4b02690, __in_chrg=&lt;optimized out&gt;) at /home/nico/kde/src/kwin/toplevel.cpp:68
#10 0x00007f052ec1eb28 in KWin::AbstractClient::~AbstractClient() (this=0x55ecc4b02690, __in_chrg=&lt;optimized out&gt;) at /home/nico/kde/src/kwin/abstract_client.cpp:110
#11 0x00007f052ee91386 in KWin::WaylandClient::~WaylandClient() (this=0x55ecc4b02690, __in_chrg=&lt;optimized out&gt;) at /home/nico/kde/src/kwin/waylandclient.h:25
#12 0x00007f052ee864aa in KWin::XdgSurfaceClient::~XdgSurfaceClient() (this=0x55ecc4b02690, __in_chrg=&lt;optimized out&gt;) at /home/nico/kde/src/kwin/xdgshellclient.cpp:118
#13 0x00007f052ee88be2 in KWin::XdgToplevelClient::~XdgToplevelClient() (this=0x55ecc4b02690, __in_chrg=&lt;optimized out&gt;) at /home/nico/kde/src/kwin/xdgshellclient.cpp:664
#14 0x00007f052ee88bfe in KWin::XdgToplevelClient::~XdgToplevelClient() (this=0x55ecc4b02690, __in_chrg=&lt;optimized out&gt;) at /home/nico/kde/src/kwin/xdgshellclient.cpp:666
#15 0x00007f052ee87f85 in KWin::XdgSurfaceClient::destroyClient() (this=0x55ecc4b02690) at /home/nico/kde/src/kwin/xdgshellclient.cpp:587
#16 0x00007f052ee963a8 in QtPrivate::FunctorCall&lt;QtPrivate::IndexesList&lt;&gt;, QtPrivate::List&lt;&gt;, void, void (KWin::XdgSurfaceClient::*)()&gt;::call(void (KWin::XdgSurfaceClient::*)(), KWin::XdgSurfaceClient*, void**)
    (f=&amp;virtual table offset 880, o=0x55ecc4b02690, arg=0x7ffd1b6c5a70) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:152
#17 0x00007f052ee958c3 in QtPrivate::FunctionPointer&lt;void (KWin::XdgSurfaceClient::*)()&gt;::call&lt;QtPrivate::List&lt;&gt;, void&gt;(void (KWin::XdgSurfaceClient::*)(), KWin::XdgSurfaceClient*, void**)
    (f=&amp;virtual table offset 880, o=0x55ecc4b02690, arg=0x7ffd1b6c5a70) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:185
#18 0x00007f052ee94781 in QtPrivate::QSlotObject&lt;void (KWin::XdgSurfaceClient::*)(), QtPrivate::List&lt;&gt;, void&gt;::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x55ecc4809b30, r=0x55ecc4b02690, a=0x7ffd1b6c5a70, ret=0x0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:418
#19 0x00007f052b7dfef6 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffd1b6c5a70, r=0x55ecc4b02690, this=0x55ecc4809b30) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#20 doActivate&lt;false&gt;(QObject*, int, void**) (sender=0x55ecc4b92810, signal_index=0, argv=argv@entry=0x7ffd1b6c5a70) at kernel/qobject.cpp:3886
#21 0x00007f052b7d9250 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x55ecc4b92810, m=m@entry=0x7f052ba6f8a0 &lt;QObject::staticMetaObject&gt;, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd1b6c5a70) at kernel/qobject.cpp:3946
#22 0x00007f052b7d92ff in QObject::destroyed(QObject*) (this=this@entry=0x55ecc4b92810, _t1=&lt;optimized out&gt;, _t1@entry=0x55ecc4b92810) at .moc/moc_qobject.cpp:219
#23 0x00007f052b7de27d in QObject::~QObject() (this=&lt;optimized out&gt;, __in_chrg=&lt;optimized out&gt;) at kernel/qobject.cpp:992
#24 0x00007f052cc70b48 in KWaylandServer::XdgToplevelInterface::~XdgToplevelInterface() (this=0x55ecc4b92810, __in_chrg=&lt;optimized out&gt;)
    at /home/nico/kde/src/kwayland-server/src/server/xdgshell_interface.cpp:521
#25 0x00007f052cc70b64 in KWaylandServer::XdgToplevelInterface::~XdgToplevelInterface() (this=0x55ecc4b92810, __in_chrg=&lt;optimized out&gt;)
    at /home/nico/kde/src/kwayland-server/src/server/xdgshell_interface.cpp:523
#26 0x00007f052cc703c6 in KWaylandServer::XdgToplevelInterfacePrivate::xdg_toplevel_destroy_resource(QtWaylandServer::xdg_toplevel::Resource*) (this=0x55ecc4a143e0, resource=0x55ecc4cd6070)
    at /home/nico/kde/src/kwayland-server/src/server/xdgshell_interface.cpp:355
#27 0x00007f052cca93a0 in QtWaylandServer::xdg_toplevel::destroy_func(wl_resource*) (client_resource=0x55ecc4c7a490) at src/server/qwayland-server-xdg-shell.cpp:940
#28 0x00007f052a431e90 in  () at /usr/lib/libwayland-server.so.0
#29 0x00007f052a431f11 in wl_resource_destroy () at /usr/lib/libwayland-server.so.0
#30 0x00007f052cc703f0 in KWaylandServer::XdgToplevelInterfacePrivate::xdg_toplevel_destroy(QtWaylandServer::xdg_toplevel::Resource*) (this=0x55ecc4a143e0, resource=0x55ecc4cd6070)
    at /home/nico/kde/src/kwayland-server/src/server/xdgshell_interface.cpp:360
#31 0x00007f052cca97da in QtWaylandServer::xdg_toplevel::handle_destroy(wl_client*, wl_resource*) (client=0x55ecc4b12820, resource=0x55ecc4c7a490) at src/server/qwayland-server-xdg-shell.cpp:1050</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061841</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2021-09-17 23:18:02 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1068</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062296</commentid>
    <comment_count>2</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2021-09-20 08:19:53 +0000</bug_when>
    <thetext>Git commit 2297983230521ee5f2a79054e66c50e84300c9ac by David Edmundson.
Committed on 20/09/2021 at 08:19.
Pushed by davidedmundson into branch &apos;master&apos;.

[Klipper] Handle incoming UTF-8 mime types

QMimeData abstracts most mime type handling, but not text/plain vs
text/plain;charset=utf-8.

This is currently being done in QWayland inside qwaylanddataoffer. Given
this code is effectively a clone, we need to have the same check here.

Interestingly mimeData-&gt;text() worked before but not hasText(), which is
why it was unnoticed in the test pasteClient tool.

This fixes klipper and GTK apps.

M  +20   -6    klipper/systemclipboard/waylandclipboard.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/2297983230521ee5f2a79054e66c50e84300c9ac</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062297</commentid>
    <comment_count>3</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2021-09-20 08:20:15 +0000</bug_when>
    <thetext>Git commit 75fbdaab0d128ed5afb339e923d83722205af2d3 by David Edmundson.
Committed on 20/09/2021 at 08:20.
Pushed by davidedmundson into branch &apos;Plasma/5.23&apos;.

[Klipper] Handle incoming UTF-8 mime types

QMimeData abstracts most mime type handling, but not text/plain vs
text/plain;charset=utf-8.

This is currently being done in QWayland inside qwaylanddataoffer. Given
this code is effectively a clone, we need to have the same check here.

Interestingly mimeData-&gt;text() worked before but not hasText(), which is
why it was unnoticed in the test pasteClient tool.

This fixes klipper and GTK apps.


(cherry picked from commit 2297983230521ee5f2a79054e66c50e84300c9ac)

M  +20   -6    klipper/systemclipboard/waylandclipboard.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/75fbdaab0d128ed5afb339e923d83722205af2d3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062303</commentid>
    <comment_count>4</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2021-09-20 08:49:36 +0000</bug_when>
    <thetext>Heh, I had the wrong bug number. This is very unrelated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062308</commentid>
    <comment_count>5</comment_count>
    <who name="Vlad Zahorodnii">vlad.zahorodnii</who>
    <bug_when>2021-09-20 08:59:38 +0000</bug_when>
    <thetext>@Nicolas, is this crash still reproducible?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062311</commentid>
    <comment_count>6</comment_count>
    <who name="Nicolas Fella">nicolas.fella</who>
    <bug_when>2021-09-20 09:09:21 +0000</bug_when>
    <thetext>Sort of. It doesn&apos;t look like kwin is crashing (no coredump in coredumpctl) but plasmashell dies with &quot;The Wayland connection broke. Did the Wayland compositor die?&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062370</commentid>
    <comment_count>7</comment_count>
    <who name="Vlad Zahorodnii">vlad.zahorodnii</who>
    <bug_when>2021-09-20 11:32:10 +0000</bug_when>
    <thetext>It might be fixed by https://invent.kde.org/plasma/kwayland-server/-/merge_requests/293. Can you please apply it and check whether plasma still crashes? Also, make sure that you have the latest libkscreen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062418</commentid>
    <comment_count>8</comment_count>
    <who name="Nicolas Fella">nicolas.fella</who>
    <bug_when>2021-09-20 14:37:37 +0000</bug_when>
    <thetext>It seems to fix it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062424</commentid>
    <comment_count>9</comment_count>
    <who name="Vlad Zahorodnii">vlad.zahorodnii</who>
    <bug_when>2021-09-20 14:48:17 +0000</bug_when>
    <thetext>Please reopen this bug report if the crash comes back.

As for plasma, there are a couple of known crashes. One of them is https://bugs.kde.org/show_bug.cgi?id=428232. Another one is the assert in screenInvariant() (can be triggered even if kwin sends valid output info).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2083663</commentid>
    <comment_count>10</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2021-12-07 21:11:26 +0000</bug_when>
    <thetext>*** Bug 446620 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>