Bug 370750 - knotes failed under wayland session but fine under X11
Summary: knotes failed under wayland session but fine under X11
Status: RESOLVED FIXED
Alias: None
Product: knotes
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 378705 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-14 15:41 UTC by RJ
Modified: 2017-10-17 10:46 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.6.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RJ 2016-10-14 15:41:53 UTC
Application: KNotes (knotes), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
84	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7fd2ce63eec0 (LWP 1731))]

Thread 5 (Thread 0x7fd2bb7fe700 (LWP 1738)):
#0  0x00007fd2e88728aa in QTimerInfoList::timerWait (this=0x7fd2a8002ed0, tm=...) at kernel/qtimerinfo_unix.cpp:413
#1  0x00007fd2e8873a2c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7fd2bb7fdab4) at kernel/qeventdispatcher_glib.cpp:132
#2  0x00007fd2e8873af5 in timerSourcePrepare (source=<optimized out>, timeout=timeout@entry=0x7fd2bb7fdab4) at kernel/qeventdispatcher_glib.cpp:165
#3  0x00007fd2da4a6699 in g_main_context_prepare (context=context@entry=0x7fd2a8000990, priority=priority@entry=0x7fd2bb7fdb40) at gmain.c:3501
#4  0x00007fd2da4a707b in g_main_context_iterate (context=context@entry=0x7fd2a8000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3909
#5  0x00007fd2da4a726c in g_main_context_iteration (context=0x7fd2a8000990, may_block=may_block@entry=1) at gmain.c:3990
#6  0x00007fd2e8873d8b in QEventDispatcherGlib::processEvents (this=0x7fd2a80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#7  0x00007fd2e88250ba in QEventLoop::exec (this=this@entry=0x7fd2bb7fdc80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#8  0x00007fd2e8682643 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#9  0x00007fd2e8686a1a in QThreadPrivate::start (arg=0x56454c3c7680) at thread/qthread_unix.cpp:344
#10 0x00007fd2df4296ca in start_thread (arg=0x7fd2bb7fe700) at pthread_create.c:333
#11 0x00007fd2e7a79f6f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 4 (Thread 0x7fd2bbfff700 (LWP 1736)):
#0  0x00007fd2e7a6e00d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fd2da4a7156 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7fd2b0002e20, timeout=<optimized out>, context=0x7fd2b0000990) at gmain.c:4228
#2  g_main_context_iterate (context=context@entry=0x7fd2b0000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3924
#3  0x00007fd2da4a726c in g_main_context_iteration (context=0x7fd2b0000990, may_block=may_block@entry=1) at gmain.c:3990
#4  0x00007fd2e8873d8b in QEventDispatcherGlib::processEvents (this=0x7fd2b00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007fd2e88250ba in QEventLoop::exec (this=this@entry=0x7fd2bbffec80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#6  0x00007fd2e8682643 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#7  0x00007fd2e8686a1a in QThreadPrivate::start (arg=0x56454c3d1e40) at thread/qthread_unix.cpp:344
#8  0x00007fd2df4296ca in start_thread (arg=0x7fd2bbfff700) at pthread_create.c:333
#9  0x00007fd2e7a79f6f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 3 (Thread 0x7fd2c0dee700 (LWP 1734)):
#0  g_mutex_unlock (mutex=0x7fd2b4000990) at gthread-posix.c:1348
#1  0x00007fd2da4a668c in g_main_context_prepare (context=context@entry=0x7fd2b4000990, priority=priority@entry=0x7fd2c0dedb40) at gmain.c:3499
#2  0x00007fd2da4a707b in g_main_context_iterate (context=context@entry=0x7fd2b4000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3909
#3  0x00007fd2da4a726c in g_main_context_iteration (context=0x7fd2b4000990, may_block=may_block@entry=1) at gmain.c:3990
#4  0x00007fd2e8873d8b in QEventDispatcherGlib::processEvents (this=0x7fd2b40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007fd2e88250ba in QEventLoop::exec (this=this@entry=0x7fd2c0dedc80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#6  0x00007fd2e8682643 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#7  0x00007fd2e8686a1a in QThreadPrivate::start (arg=0x56454c390e30) at thread/qthread_unix.cpp:344
#8  0x00007fd2df4296ca in start_thread (arg=0x7fd2c0dee700) at pthread_create.c:333
#9  0x00007fd2e7a79f6f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 2 (Thread 0x7fd2c1fff700 (LWP 1733)):
#0  0x00007fd2da4ec7f9 in g_mutex_lock (mutex=mutex@entry=0x7fd2bc000990) at gthread-posix.c:1336
#1  0x00007fd2da4a6bb6 in g_main_context_check (context=context@entry=0x7fd2bc000990, max_priority=2147483647, fds=fds@entry=0x7fd2bc003220, n_fds=n_fds@entry=1) at gmain.c:3766
#2  0x00007fd2da4a70f4 in g_main_context_iterate (context=context@entry=0x7fd2bc000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3926
#3  0x00007fd2da4a726c in g_main_context_iteration (context=0x7fd2bc000990, may_block=may_block@entry=1) at gmain.c:3990
#4  0x00007fd2e8873d8b in QEventDispatcherGlib::processEvents (this=0x7fd2bc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007fd2e88250ba in QEventLoop::exec (this=this@entry=0x7fd2c1ffec40, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#6  0x00007fd2e8682643 in QThread::exec (this=this@entry=0x7fd2f0b1b060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:507
#7  0x00007fd2f0aa57a9 in QDBusConnectionManager::run (this=0x7fd2f0b1b060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:196
#8  0x00007fd2e8686a1a in QThreadPrivate::start (arg=0x7fd2f0b1b060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:344
#9  0x00007fd2df4296ca in start_thread (arg=0x7fd2c1fff700) at pthread_create.c:333
#10 0x00007fd2e7a79f6f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 1 (Thread 0x7fd2ce63eec0 (LWP 1731)):
[KCrash Handler]
#6  0x00007fd2ef54ba9f in XInternAtoms (dpy=0x56454c00e4e0, names=0x7ffce96bdfb0, count=2, onlyIfExists=0, atoms_return=0x7ffce96bdfa0) at IntAtom.c:256
#7  0x000056454a4e7b18 in remove_sm_from_client_leader () at /usr/src/debug/kdepim-16.08.1/knotes/src/apps/main.cpp:94
#8  0x000056454a4e595b in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kdepim-16.08.1/knotes/src/apps/main.cpp:75

Reproducible: Always
Comment 1 Laurent Montel 2016-10-15 05:02:41 UTC
For sure knotes can't work on wayland it uses specific X11 method.
I will look at how to fix it but for the moment it can't .
Comment 2 Christoph Feck 2017-04-26 23:28:14 UTC
*** Bug 378705 has been marked as a duplicate of this bug. ***
Comment 3 Andrius Štikonas 2017-10-15 12:19:25 UTC
What about setting QT_QPA_PLATFORM=xcb in the code, just like KMail used to do? At least that's better than crashing.
Comment 4 Daniel Vrátil 2017-10-17 10:46:26 UTC
Git commit f603ffb669f58da5e5ef4a8c1ef0d5785ed2ec90 by Daniel Vrátil.
Committed on 17/10/2017 at 10:42.
Pushed by dvratil into branch 'Applications/17.08'.

Fix crash on startup on Wayland

The X11-specific code was trying to disable session management by removing
certian ICCC atoms from the top-level window. Instead we just unset the
SESSION_MANAGER env variable, which disables session management directly
in Qt.
FIXED-IN: 5.6.3

M  +3    -42   src/apps/main.cpp

https://commits.kde.org/knotes/f603ffb669f58da5e5ef4a8c1ef0d5785ed2ec90