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: "Fedora release 28 (Twenty Eight)" -- 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 "/lib64/libthread_db.so.1". [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&) () from /lib64/libQt5Gui.so.5 #12 0x00007ff5c286c066 in operator>>(QDataStream&, QIcon&) () from /lib64/libQt5Gui.so.5 #13 0x00007ff5a55a278c in non-virtual thunk to QtConcurrent::RunFunctionTask<QIcon>::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<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5 #4 0x00007ff5c1f1212b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () 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
Possibly related bugs - https://bugs.kde.org/show_bug.cgi?id=396239 https://bugs.kde.org/show_bug.cgi?id=392401
What could make KF5WaylandClient stuff run in a non-gui thread?
PlasmaWindowManagement interface uses QtConcurrent, but nothing else. Kate shouldn't use that as it's not intended for applications like Kate.
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?
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.
The proper fix would be to convert between QPixmap and QImage data before going to the "wire". The client could then, after receiving the QImage data, construct a QIcon from it in the main thread.
*** Bug 397533 has been marked as a duplicate of this bug. ***
*** Bug 393569 has been marked as a duplicate of this bug. ***
*** Bug 386089 has been marked as a duplicate of this bug. ***
*** Bug 402133 has been marked as a duplicate of this bug. ***
*** Bug 401710 has been marked as a duplicate of this bug. ***
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.
(In reply to Méven Car from comment #12) > 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. I'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't supported, yet, and this hasn't happened to me since.
(In reply to John Apple II from comment #13) > I'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't supported, yet, and > this hasn't happened to me since. Do you mean it hasn't happened in Wayland ? I will probably close this if you don't or can't or won't test and reproduce it.
Created attachment 123270 [details] attachment-28379-0.html On Thu, 17 Oct 2019, 19:53 Méven Car, <bugzilla_noreply@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=396591 > > --- Comment #14 from Méven Car <meven29@gmail.com> --- > (In reply to John Apple II from comment #13) > > I'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't supported, yet, > and > > this hasn't happened to me since. > > Do you mean it hasn't happened in Wayland ? > > I will probably close this if you don't or can't or won't test and > reproduce > it. > > -- > You are receiving this mail because: > You reported the bug.
Sorry, accidentally replied to the last message via e-mail. No, currently I don't have a way to test this anymore to reproduce. Kate hasn't crashed on me in a very long time, and I've run that scenario that caused it multiple times under X. Close it - if I can get it to occur again, I'll re-raise the bug.
Could not reproduce anymore.
Comment 5 and comment 6 are still valid; the code didn't change.
I don'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't use the name so we avoid the QIcon::fromTheme issue. When we're writing we copy the icon into the new thread before starting. wayland supports threaded pixmaps. I'm not sure I see the issue.
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 > 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!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > 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!