<?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>451847</bug_id>
          
          <creation_ts>2022-03-24 09:07:16 +0000</creation_ts>
          <short_desc>Wayland: kded5 crashed on login</short_desc>
          <delta_ts>2022-12-06 11:48:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>KScreen</product>
          <component>kded</component>
          <version>master</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Lyubomir">liubomirwm</reporter>
          <assigned_to name="kscreen-bugs-null@kde.org">kscreen-bugs-null</assigned_to>
          <cc>a.samirh78</cc>
    
    <cc>aleixpol</cc>
    
    <cc>bugseforuns</cc>
    
    <cc>kde</cc>
    
    <cc>kdelibs-bugs-null</cc>
    
    <cc>nate</cc>
    
    <cc>nicolas.fella</cc>
    
    <cc>postix</cc>
    
    <cc>s.ruecker</cc>
    
    <cc>vlad.zahorodnii</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/libkscreen/commit/167b699020ccd42e185834c490434a095b8b9d67</cf_commitlink>
          <cf_versionfixedin>5.25</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2113012</commentid>
    <comment_count>0</comment_count>
    <who name="Lyubomir">liubomirwm</who>
    <bug_when>2022-03-24 09:07:16 +0000</bug_when>
    <thetext>OBSERVED RESULT
Application: kded5 (kded5), signal: Segmentation fault
Content of s_kcrashErrorMessage: {_M_t = {&lt;std::__uniq_ptr_impl&lt;char, std::default_delete&lt;char []&gt; &gt;&gt; = {_M_t = std::tuple containing = {[1] = 0x0, [2] = {&lt;No data fields&gt;}}}, &lt;No data fields&gt;}}
[KCrash Handler]
#6  0x00007f8d24198f8a in QtWayland::kde_primary_output_v1::handle_primary_output(void*, kde_primary_output_v1*, char const*) (data=0x55b513665fe0, object=0x55b51365e900, output_name=0x7f8d3800856c &quot;eDP-1&quot;) at /usr/src/debug/build/backends/kwayland/qwayland-kde-primary-output-v1.cpp:83
#7  0x00007f8d46992d4a in  () at /usr/lib/libffi.so.8
#8  0x00007f8d46992267 in  () at /usr/lib/libffi.so.8
#9  0x00007f8d469a2323 in  () at /usr/lib/libwayland-client.so.0
#10 0x00007f8d4699e5ab in  () at /usr/lib/libwayland-client.so.0
#11 0x00007f8d4699ff4c in wl_display_dispatch_queue_pending () at /usr/lib/libwayland-client.so.0
#12 0x00007f8d41bb85c6 in QtWaylandClient::QWaylandDisplay::flushRequests() (this=&lt;optimized out&gt;) at /usr/src/debug/qtwayland/src/client/qwaylanddisplay.cpp:253
#13 0x00007f8d457c74af in doActivate&lt;false&gt;(QObject*, int, void**) (sender=0x55b51307f840, signal_index=4, argv=0x7fffe627f3e0) at kernel/qobject.cpp:3898
#14 0x00007f8d457e2615 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (this=0x55b51307f840, flags=...) at kernel/qeventdispatcher_glib.cpp:430
#15 0x00007f8d4578e88b in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (this=0x7fffe627f500, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#16 0x00007f8d45799fd7 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#17 0x00007f8d45cec432 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1867
#18 0x00007f8d4643f54a in QApplication::exec() () at kernel/qapplication.cpp:2829
#19 0x000055b5123a3a62 in main(int, char**) (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at /usr/src/debug/kded-5.92.0/src/kded.cpp:769
[Inferior 1 (process 294800) detached]


EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.16.15-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620

ADDITIONAL INFORMATION
What I;ve noticed is that on login usually there is a notification about some progress called &quot;akonadi_migration_agent&quot; that shows for about 2-3 seconds, but this time it is stuck.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116996</commentid>
    <comment_count>1</comment_count>
    <who name="Lyubomir">liubomirwm</who>
    <bug_when>2022-04-12 07:05:35 +0000</bug_when>
    <thetext>Probably a better trace?

Application: kded5 (kded5), signal: Segmentation fault
Content of s_kcrashErrorMessage: {_M_t = {&lt;std::__uniq_ptr_impl&lt;char, std::default_delete&lt;char []&gt; &gt;&gt; = {_M_t = std::tuple containing = {[1] = 0x0, [2] = {&lt;No data fields&gt;}}}, &lt;No data fields&gt;}}
[KCrash Handler]
#6  0x00007f7da1bf0f8a in QtWayland::kde_primary_output_v1::handle_primary_output(void*, kde_primary_output_v1*, char const*) (data=0x55aa8baabd50, object=0x55aa8ba9cd90, output_name=0x7f7db4007d4c &quot;eDP-1&quot;) at /usr/src/debug/build/backends/kwayland/qwayland-kde-primary-output-v1.cpp:83
#7  0x00007f7dc2d74536 in ffi_call_unix64 () at ../src/x86/unix64.S:105
#8  0x00007f7dc2d71037 in ffi_call_int (cif=&lt;optimized out&gt;, fn=&lt;optimized out&gt;, rvalue=&lt;optimized out&gt;, avalue=&lt;optimized out&gt;, closure=&lt;optimized out&gt;) at ../src/x86/ffi64.c:672
#9  0x00007f7dc2d805e2 in wl_closure_invoke (closure=closure@entry=0x7f7db4007c70, target=&lt;optimized out&gt;, target@entry=0x55aa8ba9cd90, opcode=opcode@entry=0, data=&lt;optimized out&gt;, flags=&lt;optimized out&gt;) at ../wayland-1.20.0/src/connection.c:1025
#10 0x00007f7dc2d80d73 in dispatch_event (display=0x55aa8b42c900, queue=&lt;optimized out&gt;, queue=&lt;optimized out&gt;) at ../wayland-1.20.0/src/wayland-client.c:1583
#11 0x00007f7dc2d80f8c in dispatch_queue (queue=0x55aa8b42c9d0, display=0x55aa8b42c900) at ../wayland-1.20.0/src/wayland-client.c:1729
#12 wl_display_dispatch_queue_pending (display=0x55aa8b42c900, queue=0x55aa8b42c9d0) at ../wayland-1.20.0/src/wayland-client.c:1971
#13 0x00007f7dbdf7f5b6 in QtWaylandClient::QWaylandDisplay::flushRequests() (this=&lt;optimized out&gt;) at /usr/src/debug/qtwayland/src/client/qwaylanddisplay.cpp:253
#14 0x00007f7dc1ba54af in doActivate&lt;false&gt;(QObject*, int, void**) (sender=0x55aa8b45fc20, signal_index=4, argv=0x7ffdc9166a30) at kernel/qobject.cpp:3898
#15 0x00007f7dc1bc0615 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (this=0x55aa8b45fc20, flags=...) at kernel/qeventdispatcher_glib.cpp:430
#16 0x00007f7dc1b6c88b in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (this=0x7ffdc9166b50, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#17 0x00007f7dc1b77fd7 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#18 0x000055aa8a270a62 in main(int, char**) (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at /usr/src/debug/kded-5.92.0/src/kded.cpp:769
[Inferior 1 (process 168335) detached]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2121290</commentid>
    <comment_count>2</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2022-05-04 22:18:16 +0000</bug_when>
    <thetext>*** Bug 452204 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2121293</commentid>
    <comment_count>3</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2022-05-04 22:36:35 +0000</bug_when>
    <thetext>My working theory is because &quot;WaylandPrimaryOutput&quot; does no wl_proxy_destroy in the dtor any messages sent afterwards will get dispatched, but our wrapper is gone, so it will crash in the generated handler.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2121696</commentid>
    <comment_count>4</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2022-05-06 11:19:30 +0000</bug_when>
    <thetext>Git commit 167b699020ccd42e185834c490434a095b8b9d67 by David Edmundson.
Committed on 06/05/2022 at 11:19.
Pushed by davidedmundson into branch &apos;master&apos;.

Delete proxy for PrimaryOutput wayland interface in destructor

When our wrapper class QtWayland::kde_primary_output_v1 gets destroyed
there is no code to delete the underlying wl_proxy object. Any events to
that proxy after our wrapper have gone will get disaptched to the
generated code which in turn will just crash.

M  +7    -0    backends/kwayland/waylandoutputmanagement.cpp
M  +1    -0    backends/kwayland/waylandoutputmanagement.h

https://invent.kde.org/plasma/libkscreen/commit/167b699020ccd42e185834c490434a095b8b9d67</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2127520</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Samir">a.samirh78</who>
    <bug_when>2022-05-29 10:22:09 +0000</bug_when>
    <thetext>*** Bug 454362 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2181983</commentid>
    <comment_count>6</comment_count>
    <who name="Nicolas Fella">nicolas.fella</who>
    <bug_when>2022-12-06 11:48:48 +0000</bug_when>
    <thetext>https://bugs.kde.org/show_bug.cgi?id=462700 has a similar crash in a recent Plasma</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>