<?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>396591</bug_id>
          
          <creation_ts>2018-07-17 07:43:52 +0000</creation_ts>
          <short_desc>Kate crashed under Wayland</short_desc>
          <delta_ts>2020-05-08 22:19:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>kwayland</product>
          <component>client</component>
          <version>5.49.0</version>
          <rep_platform>Fedora RPMs</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <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>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John Apple II">jappleii</reporter>
          <assigned_to name="Martin Flöser">mgraesslin</assigned_to>
          <cc>Andreas</cc>
    
    <cc>bilal.elmas</cc>
    
    <cc>christoph</cc>
    
    <cc>kde</cc>
    
    <cc>meven29</cc>
    
    <cc>mgraesslin</cc>
    
    <cc>notuxius</cc>
    
    <cc>rorus</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>1767329</commentid>
    <comment_count>0</comment_count>
    <who name="John Apple II">jappleii</who>
    <bug_when>2018-07-17 07:43:52 +0000</bug_when>
    <thetext>Application: kate (17.12.2)

Qt Version: 5.10.1
Frameworks Version: 5.47.0
Operating System: Linux 4.17.5-200.fc28.x86_64 x86_64
Distribution: &quot;Fedora release 28 (Twenty Eight)&quot;

-- Information about the crash:
- What I was doing when the application crashed:
I have just stared using a Wayland session.  I had opened 2 files from Thunderbird e-mail attachments in Kate and I was viewing them - 1 JSON file and one .sh file.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Kate (kate), signal: Aborted
Using host libthread_db library &quot;/lib64/libthread_db.so.1&quot;.
[Current thread is 1 (Thread 0x7ff5b38b9980 (LWP 25903))]

Thread 3 (Thread 0x7ff59200a700 (LWP 27113)):
[KCrash Handler]
#6  0x00007ff5c0fdef2b in raise () from /lib64/libc.so.6
#7  0x00007ff5c0fc9561 in abort () from /lib64/libc.so.6
#8  0x00007ff5c1d2bea3 in QMessageLogger::fatal(char const*, ...) const () from /lib64/libQt5Core.so.5
#9  0x00007ff5c285dde7 in qt_pixmap_thread_test() () from /lib64/libQt5Gui.so.5
#10 0x00007ff5c285de98 in QPixmap::QPixmap() () from /lib64/libQt5Gui.so.5
#11 0x00007ff5c286b56b in QPixmapIconEngine::read(QDataStream&amp;) () from /lib64/libQt5Gui.so.5
#12 0x00007ff5c286c066 in operator&gt;&gt;(QDataStream&amp;, QIcon&amp;) () from /lib64/libQt5Gui.so.5
#13 0x00007ff5a55a278c in non-virtual thunk to QtConcurrent::RunFunctionTask&lt;QIcon&gt;::run() () from /lib64/libKF5WaylandClient.so.5
#14 0x00007ff5c1d62431 in QThreadPoolThread::run() () from /lib64/libQt5Core.so.5
#15 0x00007ff5c1d6511d in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#16 0x00007ff5bf08c594 in start_thread () from /lib64/libpthread.so.0
#17 0x00007ff5c10a202f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7ff5a19cf700 (LWP 25905)):
#0  0x00007ff5b9dee4b8 in g_mutex_unlock () from /lib64/libglib-2.0.so.0
#1  0x00007ff5b9da7b0e in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007ff5b9da7d10 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007ff5c1f63c2b in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /lib64/libQt5Core.so.5
#4  0x00007ff5c1f1212b in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /lib64/libQt5Core.so.5
#5  0x00007ff5c1d609c6 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007ff5c219a299 in QDBusConnectionManager::run() () from /lib64/libQt5DBus.so.5
#7  0x00007ff5c1d6511d in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007ff5bf08c594 in start_thread () from /lib64/libpthread.so.0
#9  0x00007ff5c10a202f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7ff5b38b9980 (LWP 25903)):
#0  0x00007ff5bf09252c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ff5c1d6583b in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQt5Core.so.5
#2  0x00007ff5c1d610ba in QThreadPoolPrivate::waitForDone(int) () from /lib64/libQt5Core.so.5
#3  0x00007ff5c1d61645 in QThreadPool::waitForDone(int) () from /lib64/libQt5Core.so.5
#4  0x00007ff5c1f15749 in QCoreApplication::~QCoreApplication() () from /lib64/libQt5Core.so.5
#5  0x00007ff5c27ee3ed in QGuiApplication::~QGuiApplication() () from /lib64/libQt5Gui.so.5
#6  0x00007ff5c2d408e4 in QApplication::~QApplication() () from /lib64/libQt5Widgets.so.5
#7  0x0000561d041b2a6d in main ()

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767370</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Mentyu">notuxius</who>
    <bug_when>2018-07-17 12:23:51 +0000</bug_when>
    <thetext>Possibly related bugs - https://bugs.kde.org/show_bug.cgi?id=396239 https://bugs.kde.org/show_bug.cgi?id=392401</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1770034</commentid>
    <comment_count>2</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-08-02 22:42:33 +0000</bug_when>
    <thetext>What could make KF5WaylandClient stuff run in a non-gui thread?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1770158</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Flöser">mgraesslin</who>
    <bug_when>2018-08-03 15:54:55 +0000</bug_when>
    <thetext>PlasmaWindowManagement interface uses QtConcurrent, but nothing else. Kate shouldn&apos;t use that as it&apos;s not intended for applications like Kate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1772067</commentid>
    <comment_count>4</comment_count>
    <who name="Christoph Cullmann">christoph</who>
    <bug_when>2018-08-15 21:04:56 +0000</bug_when>
    <thetext>I am not aware that we use such a thing (and even less in a thread).
Is there anything specific to search for if such code slipped in?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1775390</commentid>
    <comment_count>5</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-08-30 23:24:09 +0000</bug_when>
    <thetext>Reassigning to kwayland. In plasmawindowmanagement.cpp, QtConcurrent is indeed used to read QIcon. The QIcon class cannot be used outside the main thread. While most icons just reference a theme using a name, there exists icons that are contructed from QPixmap. Serializing it causes the error here.

A simple workaround is to check if the QIcon has name using QIcon::name(), and if not, refuse to serialize it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1775392</commentid>
    <comment_count>6</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-08-30 23:33:52 +0000</bug_when>
    <thetext>The proper fix would be to convert between QPixmap and QImage data before going to the &quot;wire&quot;. The client could then, after receiving the QImage data, construct a QIcon from it in the main thread.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778950</commentid>
    <comment_count>7</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-09-05 00:49:17 +0000</bug_when>
    <thetext>*** Bug 397533 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778953</commentid>
    <comment_count>8</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-09-05 00:49:57 +0000</bug_when>
    <thetext>*** Bug 393569 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778955</commentid>
    <comment_count>9</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-09-05 00:50:08 +0000</bug_when>
    <thetext>*** Bug 386089 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1828908</commentid>
    <comment_count>10</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-12-27 20:27:21 +0000</bug_when>
    <thetext>*** Bug 402133 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1828910</commentid>
    <comment_count>11</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2018-12-27 20:27:27 +0000</bug_when>
    <thetext>*** Bug 401710 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886039</commentid>
    <comment_count>12</comment_count>
    <who name="Méven Car">meven29</who>
    <bug_when>2019-10-17 07:55:29 +0000</bug_when>
    <thetext>Is this still reproducible ?
It is not (or at least I never had this crash) on my Plasma 5.17, Qt 5.12 system.

Those bugs were reported a few versions ago, Wayland support in Plasma and Qt has improved since.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886042</commentid>
    <comment_count>13</comment_count>
    <who name="John Apple II">jappleii</who>
    <bug_when>2019-10-17 08:02:52 +0000</bug_when>
    <thetext>(In reply to Méven Car from comment #12)
&gt; Is this still reproducible ?
&gt; It is not (or at least I never had this crash) on my Plasma 5.17, Qt 5.12
&gt; system.
&gt; 
&gt; Those bugs were reported a few versions ago, Wayland support in Plasma and
&gt; Qt has improved since.

I&apos;ve switched back to using KDE under X for about a year now - there are a couple of critical features for me that Wayland hasn&apos;t supported, yet, and this hasn&apos;t happened to me since.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886064</commentid>
    <comment_count>14</comment_count>
    <who name="Méven Car">meven29</who>
    <bug_when>2019-10-17 08:53:10 +0000</bug_when>
    <thetext>(In reply to John Apple II from comment #13)
&gt; I&apos;ve switched back to using KDE under X for about a year now - there are a
&gt; couple of critical features for me that Wayland hasn&apos;t supported, yet, and
&gt; this hasn&apos;t happened to me since.

Do you mean it hasn&apos;t happened in Wayland ?

I will probably close this if you don&apos;t or can&apos;t or won&apos;t test and reproduce it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886084</commentid>
    <comment_count>15</comment_count>
      <attachid>123270</attachid>
    <who name="John Apple II">jappleii</who>
    <bug_when>2019-10-17 10:04:05 +0000</bug_when>
    <thetext>Created attachment 123270
attachment-28379-0.html

On Thu, 17 Oct 2019, 19:53 Méven Car, &lt;bugzilla_noreply@kde.org&gt; wrote:

&gt; https://bugs.kde.org/show_bug.cgi?id=396591
&gt;
&gt; --- Comment #14 from Méven Car &lt;meven29@gmail.com&gt; ---
&gt; (In reply to John Apple II from comment #13)
&gt; &gt; I&apos;ve switched back to using KDE under X for about a year now - there are
&gt; a
&gt; &gt; couple of critical features for me that Wayland hasn&apos;t supported, yet,
&gt; and
&gt; &gt; this hasn&apos;t happened to me since.
&gt;
&gt; Do you mean it hasn&apos;t happened in Wayland ?
&gt;
&gt; I will probably close this if you don&apos;t or can&apos;t or won&apos;t test and
&gt; reproduce
&gt; it.
&gt;
&gt; --
&gt; You are receiving this mail because:
&gt; You reported the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886126</commentid>
    <comment_count>16</comment_count>
    <who name="John Apple II">jappleii</who>
    <bug_when>2019-10-17 12:50:13 +0000</bug_when>
    <thetext>Sorry, accidentally replied to the last message via e-mail.  No, currently I don&apos;t have a way to test this anymore to reproduce.  Kate hasn&apos;t crashed on me in a very long time, and I&apos;ve run that scenario that caused it multiple times under X.

Close it - if I can get it to occur again, I&apos;ll re-raise the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886138</commentid>
    <comment_count>17</comment_count>
    <who name="Méven Car">meven29</who>
    <bug_when>2019-10-17 13:20:04 +0000</bug_when>
    <thetext>Could not reproduce anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886140</commentid>
    <comment_count>18</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2019-10-17 13:21:38 +0000</bug_when>
    <thetext>Comment 5 and comment 6 are still valid; the code didn&apos;t change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1920933</commentid>
    <comment_count>19</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2020-04-07 21:51:25 +0000</bug_when>
    <thetext>I don&apos;t know why Kate was ever going in this code. That was something else that was clearly wrong.

As for QIcon and threads, the retrieval of an icon is fine. 
We get it in a thread, no-one else can be using it at the same time.

The datastream serialisation doesn&apos;t use the name so we avoid the QIcon::fromTheme issue.

When we&apos;re writing we copy the icon into the new thread before starting. 

wayland supports threaded pixmaps. 

I&apos;m not sure I see the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1924122</commentid>
    <comment_count>20</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2020-04-22 04:33:09 +0000</bug_when>
    <thetext>Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED &gt; WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927904</commentid>
    <comment_count>21</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2020-05-07 04:33:14 +0000</bug_when>
    <thetext>This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED &gt; WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>123270</attachid>
            <date>2019-10-17 10:04:06 +0000</date>
            <delta_ts>2019-10-17 10:04:06 +0000</delta_ts>
            <desc>attachment-28379-0.html</desc>
            <filename>attachment-28379-0.html</filename>
            <type>text/html</type>
            <size>1160</size>
            <attacher name="John Apple II">jappleii</attacher>
            
              <data encoding="base64">PGRpdiBkaXI9ImF1dG8iPjwvZGl2Pjxicj48ZGl2IGNsYXNzPSJnbWFpbF9xdW90ZSI+PGRpdiBk
aXI9Imx0ciIgY2xhc3M9ImdtYWlsX2F0dHIiPk9uIFRodSwgMTcgT2N0IDIwMTksIDE5OjUzIE3D
qXZlbiBDYXIsICZsdDs8YSBocmVmPSJtYWlsdG86YnVnemlsbGFfbm9yZXBseUBrZGUub3JnIj5i
dWd6aWxsYV9ub3JlcGx5QGtkZS5vcmc8L2E+Jmd0OyB3cm90ZTo8YnI+PC9kaXY+PGJsb2NrcXVv
dGUgY2xhc3M9ImdtYWlsX3F1b3RlIiBzdHlsZT0ibWFyZ2luOjAgMCAwIC44ZXg7Ym9yZGVyLWxl
ZnQ6MXB4ICNjY2Mgc29saWQ7cGFkZGluZy1sZWZ0OjFleCI+PGEgaHJlZj0iaHR0cHM6Ly9idWdz
LmtkZS5vcmcvc2hvd19idWcuY2dpP2lkPTM5NjU5MSIgcmVsPSJub3JlZmVycmVyIG5vcmVmZXJy
ZXIiIHRhcmdldD0iX2JsYW5rIj5odHRwczovL2J1Z3Mua2RlLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
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