<?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>422418</bug_id>
          
          <creation_ts>2020-06-03 13:31:39 +0000</creation_ts>
          <short_desc>Plasma crashes in ShellCorona::handleScreenRemoved() when I set multi-monitor mode to &quot;Switch to external screen&quot;</short_desc>
          <delta_ts>2021-08-24 13:43:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>generic-multiscreen</component>
          <version>master</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>356394</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>drkonqi, wayland-only</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Patrick Silva">bugseforuns</reporter>
          <assigned_to name="Aleix Pol">aleixpol</assigned_to>
          <cc>baito30</cc>
    
    <cc>bjoernv</cc>
    
    <cc>jcnengel</cc>
    
    <cc>kde</cc>
    
    <cc>nate</cc>
    
    <cc>plasma-bugs-null</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>1934349</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2020-06-03 13:31:39 +0000</bug_when>
    <thetext>Application: plasmashell (5.19.80)

Qt Version: 5.14.2
Frameworks Version: 5.71.0
Operating System: Linux 5.3.0-45-generic x86_64
Windowing system: Wayland
Distribution: KDE neon Unstable Edition

-- Information about the crash:
- What I was doing when the application crashed:
I was using the laptop screen, I switched to &quot;Switch to external screen&quot; multi-monitor mode and system tray shown drkonqi icon.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Content of s_kcrashErrorMessage: [Current thread is 1 (Thread 0x7fd49d401c80 (LWP 13276))]
[KCrash Handler]
#6  0x00007fd497a136c0 in QScreen::refreshRate() const (this=0x0) at kernel/qscreen.cpp:556
#7  0x00007fd49b2fec9c in qsgrl_animation_interval () at scenegraph/qsgthreadedrenderloop.cpp:123
#8  0x00007fd49b2fec9c in QSGThreadedRenderLoop::startOrStopAnimationTimer() (this=this@entry=0x5626c1691090) at scenegraph/qsgthreadedrenderloop.cpp:1112
#9  0x00007fd49b302f74 in QSGThreadedRenderLoop::windowDestroyed(QQuickWindow*) (this=0x5626c1691090, window=0x5626c24cf910) at scenegraph/qsgthreadedrenderloop.cpp:1170
#10 0x00007fd49b35d242 in QQuickWindow::~QQuickWindow() (this=0x5626c24cf910, __in_chrg=&lt;optimized out&gt;) at items/qquickwindow.cpp:1419
#11 0x00005626bf1768b9 in PanelView::~PanelView() (this=0x5626c24cf910, __in_chrg=&lt;optimized out&gt;) at ./shell/panelview.cpp:123
#12 0x00005626bf18364c in ShellCorona::removeDesktop(DesktopView*) (this=this@entry=0x5626c11fba70, desktopView=0x5626c239dea0) at ./shell/shellcorona.cpp:1152
#13 0x00005626bf1836a2 in ShellCorona::handleScreenRemoved(QScreen*) (this=0x5626c11fba70, screen=&lt;optimized out&gt;) at ./shell/shellcorona.cpp:1188
#14 0x00007fd4974296d7 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe86f120e0, r=0x5626c11fba70, this=&lt;optimized out&gt;) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#15 0x00007fd4974296d7 in doActivate&lt;false&gt;(QObject*, int, void**) (sender=0x7ffe86f128d0, signal_index=10, argv=0x7ffe86f120e0) at kernel/qobject.cpp:3870
#16 0x00007fd497423f92 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=&lt;optimized out&gt;, m=m@entry=0x7fd4981645a0 &lt;QGuiApplication::staticMetaObject&gt;, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffe86f120e0) at kernel/qobject.cpp:3930
#17 0x00007fd4979df202 in QGuiApplication::screenRemoved(QScreen*) (this=&lt;optimized out&gt;, _t1=&lt;optimized out&gt;) at .moc/moc_qguiapplication.cpp:396
#18 0x00007fd497a1450c in QScreen::~QScreen() (this=0x5626c11daa70, __in_chrg=&lt;optimized out&gt;) at kernel/qscreen.cpp:126
#19 0x00007fd497a14609 in QScreen::~QScreen() (this=0x5626c11daa70, __in_chrg=&lt;optimized out&gt;) at kernel/qscreen.cpp:148
#20 0x00007fd4979c46b7 in QWindowSystemInterface::handleScreenRemoved(QPlatformScreen*) (platformScreen=0x5626c11dc4e0) at kernel/qwindowsysteminterface.cpp:840
#21 0x00007fd48a7db5c0 in QtWaylandClient::QWaylandDisplay::registry_global_remove(unsigned int) (this=0x5626c11d4230, id=&lt;optimized out&gt;) at qwaylanddisplay.cpp:365
#22 0x00007fd48ffb0dae in ffi_call_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#23 0x00007fd48ffb071f in ffi_call () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#24 0x00007fd495bf5e24 in wl_closure_invoke (closure=closure@entry=0x5626c3087960, flags=flags@entry=1, target=&lt;optimized out&gt;, target@entry=0x5626c11d60b0, opcode=opcode@entry=1, data=&lt;optimized out&gt;) at ../src/connection.c:1006
#25 0x00007fd495bf2659 in dispatch_event (display=display@entry=0x5626c11d8920, queue=&lt;optimized out&gt;) at ../src/wayland-client.c:1427
#26 0x00007fd495bf3b24 in dispatch_queue (queue=0x5626c11d89e8, display=0x5626c11d8920) at ../src/wayland-client.c:1573
#27 0x00007fd495bf3b24 in wl_display_dispatch_queue_pending (display=0x5626c11d8920, queue=0x5626c11d89e8) at ../src/wayland-client.c:1815
#28 0x00007fd495bf3b7c in wl_display_dispatch_pending (display=&lt;optimized out&gt;) at ../src/wayland-client.c:1878
#29 0x00007fd48a7d9642 in QtWaylandClient::QWaylandDisplay::flushRequests() (this=0x5626c11d4230) at qwaylanddisplay.cpp:208
#30 0x00007fd4974294b9 in doActivate&lt;false&gt;(QObject*, int, void**) (sender=0x5626c120b4c0, signal_index=4, argv=0x7ffe86f12640) at kernel/qobject.cpp:3882
#31 0x00007fd497423f92 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x5626c120b4c0, m=m@entry=0x7fd4978bc220 &lt;QAbstractEventDispatcher::staticMetaObject&gt;, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3930
#32 0x00007fd4973eaba3 in QAbstractEventDispatcher::awake() (this=this@entry=0x5626c120b4c0) at .moc/moc_qabstracteventdispatcher.cpp:149
#33 0x00007fd49744d7eb in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (this=0x5626c120b4c0, flags=...) at kernel/qeventdispatcher_glib.cpp:430
#34 0x00007fd4973ecd2a in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (this=this@entry=0x7ffe86f12760, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#35 0x00007fd4973f64a0 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1383
#36 0x00005626bf1670ca in main(int, char**) (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at ./shell/main.cpp:222

Possible duplicates by query: bug 419060, bug 418477, bug 397477, bug 364843, bug 362004.

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2006501</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2021-02-25 21:11:46 +0000</bug_when>
    <thetext>*** Bug 431388 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2041045</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2021-06-15 23:17:52 +0000</bug_when>
    <thetext>*** Bug 438517 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2055921</commentid>
    <comment_count>3</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2021-08-24 13:42:32 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 356394 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2055924</commentid>
    <comment_count>4</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2021-08-24 13:43:59 +0000</bug_when>
    <thetext>Though it&apos;s also super wrong that we&apos;re doing 

#13 0x00005626bf1836a2 in ShellCorona::handleScreenRemoved(QScreen*) (this=0x5626c11fba70, screen=&lt;optimized out&gt;) at ./shell/shellcorona.cpp:1188

in response to

#18 0x00007fd497a1450c in QScreen::~QScreen() (this=0x5626c11daa70, __in_chrg=&lt;optimized out&gt;) at kernel/qscreen.cpp:126

now QGuiApplication::screenRemoved which comes way before object destruction. I&apos;m sure that&apos;s fixed in Plasma</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>