<?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>490129</bug_id>
          
          <creation_ts>2024-07-11 22:05:57 +0000</creation_ts>
          <short_desc>Tokodon crashes on display hotplug events</short_desc>
          <delta_ts>2024-07-13 12:47:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>Tokodon</product>
          <component>general</component>
          <version>24.05.2</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>489072</dup_id>
          
          <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="Christopher Snowhill">kode54</reporter>
          <assigned_to name="Unassigned bugs">unassigned-bugs-null</assigned_to>
          <cc>carl</cc>
    
    <cc>josh</cc>
    
    <cc>postix</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>2336748</commentid>
    <comment_count>0</comment_count>
    <who name="Christopher Snowhill">kode54</who>
    <bug_when>2024-07-11 22:05:57 +0000</bug_when>
    <thetext>SUMMARY
Tokodon crashes reliably on display hotplug events, which occur when my primary display is powered back on after having been powered off for a while, such as DPMS power off. It remains attached until powered back on.

STEPS TO REPRODUCE
1. Start Tokodon
2. Leave it running
3. Detach a display
4. Reattach it

OBSERVED RESULT
Tokodon crashes in a Qt event handler.

EXPECTED RESULT
Tokodon should not need to watch for display detach or reattach events.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux running 6.9.8-1-cachyos
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION

This crash is occurring from a labwc git / wlroots 0.18 desktop running Tokodon. It may not be happening this way if I were running Plasma as my current desktop.

Backtrace:
```
#0  QScopedPointer&lt;QPlatformScreenPrivate, QScopedPointerDeleter&lt;QPlatformScreenPrivate&gt; &gt;::get (
    this=0x8) at /usr/src/debug/qt6-base/qtbase/src/corelib/tools/qscopedpointer.h:110
#1  qGetPtrHelper&lt;QScopedPointer&lt;QPlatformScreenPrivate, QScopedPointerDeleter&lt;QPlatformScreenPrivate&gt; &gt; const&gt; (ptr=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qtclasshelpermacros.h:79
#2  QPlatformScreen::d_func (this=0x0)
    at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qplatformscreen.h:45
#3  QPlatformScreen::screen (this=this@entry=0x0)
    at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qplatformscreen.cpp:115
#4  0x000074db01ba07b6 in QtWaylandClient::QWaylandWindow::handleScreensChanged (
    this=0x5f538cb6ceb0) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylandwindow.cpp:1410
#5  0x000074db077a16f7 in QtPrivate::QSlotObjectBase::call (this=&lt;optimized out&gt;, 
    r=&lt;optimized out&gt;, a=&lt;optimized out&gt;, this=&lt;optimized out&gt;, r=&lt;optimized out&gt;, 
    a=&lt;optimized out&gt;) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:469
#6  doActivate&lt;false&gt; (sender=&lt;optimized out&gt;, signal_index=&lt;optimized out&gt;, argv=&lt;optimized out&gt;)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4086
#7  0x000074db077a16f7 in QtPrivate::QSlotObjectBase::call (this=&lt;optimized out&gt;, 
    r=&lt;optimized out&gt;, a=&lt;optimized out&gt;, this=&lt;optimized out&gt;, r=&lt;optimized out&gt;, 
    a=&lt;optimized out&gt;) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:469
#8  doActivate&lt;false&gt; (sender=&lt;optimized out&gt;, signal_index=&lt;optimized out&gt;, argv=&lt;optimized out&gt;)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4086
#9  0x000074db07deb0a1 in QGuiApplication::screenAdded (this=&lt;optimized out&gt;, _t1=0x5f53910784b0)
    at /usr/src/debug/qt6-base/build/src/gui/Gui_autogen/include/moc_qguiapplication.cpp:421
#10 QWindowSystemInterface::handleScreenAdded (platformScreen=platformScreen@entry=0x5f5392a64da0, 
    isPrimary=isPrimary@entry=false)
--Type &lt;RET&gt; for more, q to quit, c to continue without paging--c
    at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:727
#11 0x000074db01b74eea in QtWaylandClient::QWaylandDisplay::handleScreenInitialized (
    this=0x5f538ba94c20, screen=&lt;optimized out&gt;)
    at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylanddisplay.cpp:601
#12 0x000074db01b97ec6 in QtWaylandClient::QWaylandScreen::maybeInitialize (this=0x5f5392a64da0)
    at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylandscreen.cpp:74
#13 QtWaylandClient::QWaylandScreen::maybeInitialize (this=0x5f5392a64da0)
    at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylandscreen.cpp:65
#14 0x000074daf1ecb596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#15 0x000074daf1ec800e in ffi_call_int (cif=cif@entry=0x7ffe4c4d6150, fn=&lt;optimized out&gt;, 
    rvalue=&lt;optimized out&gt;, avalue=&lt;optimized out&gt;, closure=closure@entry=0x0)
    at ../src/x86/ffi64.c:673
#16 0x000074daf1ecabd3 in ffi_call (cif=cif@entry=0x7ffe4c4d6150, fn=&lt;optimized out&gt;, 
    rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffe4c4d6220) at ../src/x86/ffi64.c:710
#17 0x000074db05d80860 in wl_closure_invoke (closure=closure@entry=0x74dae00043a0, 
    target=&lt;optimized out&gt;, target@entry=0x5f5391ce3400, opcode=opcode@entry=2, 
    data=&lt;optimized out&gt;, flags=1) at ../wayland-1.23.0/src/connection.c:1228
#18 0x000074db05d810d9 in dispatch_event (display=display@entry=0x5f538ba94e50, 
    queue=queue@entry=0x5f538ba94f48) at ../wayland-1.23.0/src/wayland-client.c:1670
#19 0x000074db05d814f3 in dispatch_queue (display=0x5f538ba94e50, queue=0x5f538ba94f48)
    at ../wayland-1.23.0/src/wayland-client.c:1816
#20 wl_display_dispatch_queue_pending (display=0x5f538ba94e50, queue=0x5f538ba94f48)
    at ../wayland-1.23.0/src/wayland-client.c:2058
#21 0x000074db01b690a6 in QtWaylandClient::QWaylandDisplay::flushRequests (this=&lt;optimized out&gt;)
    at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylanddisplay.cpp:227
#22 0x000074db0778c00f in QObject::event (this=0x5f538ba94c20, e=0x74dae0001800)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1452
#23 0x000074db086fc51c in QApplicationPrivate::notify_helper (this=&lt;optimized out&gt;, 
    receiver=0x5f538ba94c20, e=0x74dae0001800)
    at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3287
#24 0x000074db07744d28 in QCoreApplication::notifyInternal2 (receiver=0x5f538ba94c20, 
    event=event@entry=0x74dae0001800)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1142
#25 0x000074db077450eb in QCoreApplication::sendEvent (receiver=&lt;optimized out&gt;, 
    event=0x74dae0001800)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1583
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5f538b9f0ba0)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1940
#27 0x000074db079a49ec in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1797
#28 postEventSourceDispatch (s=0x5f538ba92130)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#29 0x000074db06f22ab9 in g_main_dispatch (context=0x74dae8000f00) at ../glib/glib/gmain.c:3344
#30 0x000074db06f849e7 in g_main_context_dispatch_unlocked (context=0x74dae8000f00)
    at ../glib/glib/gmain.c:4152
#31 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x74dae8000f00, 
    block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;)
    at ../glib/glib/gmain.c:4217
#32 0x000074db06f21fc5 in g_main_context_iteration (context=0x74dae8000f00, may_block=1)
    at ../glib/glib/gmain.c:4282
#33 0x000074db079a2cbd in QEventDispatcherGlib::processEvents (this=0x5f538ba9ddc0, flags=...)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#34 0x000074db0774f01e in QEventLoop::processEvents (this=0x7ffe4c4d6850, flags=...)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:100
#35 QEventLoop::exec (this=0x7ffe4c4d6850, flags=...)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:182
#36 0x000074db0774934d in QCoreApplication::exec ()
    at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:74
#37 0x00005f534dbee305 in main (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;)
    at /usr/src/debug/tokodon/tokodon-24.05.2/src/main.cpp:284
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2337125</commentid>
    <comment_count>1</comment_count>
    <who name="postix">postix</who>
    <bug_when>2024-07-13 12:47:14 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 489072 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>