Bug 295615 - kmail crashes trying to edit subject/message body with some dictionary languages set in identity properties
Summary: kmail crashes trying to edit subject/message body with some dictionary langua...
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.8
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-09 14:30 UTC by kavol
Modified: 2012-04-16 20:47 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.2


Attachments
New crash information added by DrKonqi (5.55 KB, text/plain)
2012-03-12 11:09 UTC, kavol
Details
valgrind log from the crash (79.95 KB, text/x-log)
2012-03-13 14:58 UTC, kavol
Details
better log (with --track-origins=yes) (94.15 KB, text/x-log)
2012-03-13 15:08 UTC, kavol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2012-03-09 14:30:27 UTC
SSIA

... oh, and the DrKonqi vs new bugs.kde.org issue is still unfixed

Application: KMail (kmail), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7ff8137fb840 (LWP 2564))]

Thread 3 (Thread 0x7ff804c6e700 (LWP 2575)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
#1  0x000000332fdb86ec in WTF::TCMalloc_PageHeap::scavengerThread (this=0x333077cc20) at ../../../Source/JavaScriptCore/wtf/FastMalloc.cpp:2495
#2  0x000000332fdb8819 in WTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../../../Source/JavaScriptCore/wtf/FastMalloc.cpp:1618
#3  0x000000315e607d90 in start_thread (arg=0x7ff804c6e700) at pthread_create.c:309
#4  0x000000315def0f5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7ff804355700 (LWP 2576)):
#0  0x000000315dee85c3 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x0000003160e44fd8 in g_main_context_poll (n_fds=1, fds=0x7ff7fc0013e0, priority=<optimized out>, timeout=6884, context=0x7ff7fc0009a0) at gmain.c:3402
#2  g_main_context_iterate (context=0x7ff7fc0009a0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3084
#3  0x0000003160e4549c in g_main_context_iteration (context=0x7ff7fc0009a0, may_block=1) at gmain.c:3152
#4  0x00000031687a7dc6 in QEventDispatcherGlib::processEvents (this=0x7ff7fc0008c0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#5  0x0000003168778182 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00000031687783d7 in QEventLoop::exec (this=0x7ff804354d40, flags=...) at kernel/qeventloop.cpp:204
#7  0x0000003168678b27 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x000000316867bb6b in QThreadPrivate::start (arg=0x16167e0) at thread/qthread_unix.cpp:298
#9  0x000000315e607d90 in start_thread (arg=0x7ff804355700) at pthread_create.c:309
#10 0x000000315def0f5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7ff8137fb840 (LWP 2564)):
[KCrash Handler]
#6  0x000000316878a3c4 in QObject::killTimer (this=0x746be90, id=1) at kernel/qobject.cpp:1603
#7  0x0000003168796271 in stop (this=0x746be90) at kernel/qtimer.cpp:266
#8  QTimer::stop (this=0x746be90) at kernel/qtimer.cpp:263
#9  0x000000316879628f in QTimer::start (this=0x746be90) at kernel/qtimer.cpp:216
#10 0x00000038896abfc4 in eventFilter (e=0x7ffffa1326e0, o=0x1ce4570, this=0xba0a580) at /usr/src/debug/kdelibs-4.8.1/kdeui/sonnet/highlighter.cpp:356
#11 Sonnet::Highlighter::eventFilter (this=0xba0a580, o=0x1ce4570, e=0x7ffffa1326e0) at /usr/src/debug/kdelibs-4.8.1/kdeui/sonnet/highlighter.cpp:337
#12 0x00000031687791d8 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x1ce4570, event=0x7ffffa1326e0) at kernel/qcoreapplication.cpp:986
#13 0x000000316b7c995f in notify_helper (e=0x7ffffa1326e0, receiver=0x1ce4570, this=0xb916a0) at kernel/qapplication.cpp:4546
#14 QApplicationPrivate::notify_helper (this=0xb916a0, receiver=0x1ce4570, e=0x7ffffa1326e0) at kernel/qapplication.cpp:4522
#15 0x000000316b7ceede in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffffa1326e0) at kernel/qapplication.cpp:3991
#16 0x0000003889651d56 in KApplication::notify (this=0x7ffffa1336b0, receiver=0x1ce4570, event=0x7ffffa1326e0) at /usr/src/debug/kdelibs-4.8.1/kdeui/kernel/kapplication.cpp:311
#17 0x000000316877904c in QCoreApplication::notifyInternal (this=0x7ffffa1336b0, receiver=0x1ce4570, event=0x7ffffa1326e0) at kernel/qcoreapplication.cpp:876
#18 0x000000316b868719 in QKeyMapper::sendKeyEvent (keyWidget=0x1ce4570, grab=<optimized out>, type=QEvent::KeyPress, code=16777249, modifiers=..., text=..., autorepeat=false, count=1, nativeScanCode=105, nativeVirtualKey=65508, nativeModifiers=16) at kernel/qkeymapper_x11.cpp:1866
#19 0x000000316b868b8b in QKeyMapperPrivate::translateKeyEvent (this=0xd09360, keyWidget=0x1ce4570, event=0x7ffffa1331c0, grab=false) at kernel/qkeymapper_x11.cpp:1836
#20 0x000000316b844ce4 in QApplication::x11ProcessEvent (this=0x7ffffa1336b0, event=0x7ffffa1331c0) at kernel/qapplication_x11.cpp:3534
#21 0x000000316b86c97c in x11EventSourceDispatch (s=0xb97840, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#22 0x0000003160e44acd in g_main_dispatch (context=0xb95de0) at gmain.c:2441
#23 g_main_context_dispatch (context=0xb95de0) at gmain.c:3011
#24 0x0000003160e452c8 in g_main_context_iterate (context=0xb95de0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3089
#25 0x0000003160e4549c in g_main_context_iteration (context=0xb95de0, may_block=1) at gmain.c:3152
#26 0x00000031687a7d5f in QEventDispatcherGlib::processEvents (this=0xb39af0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#27 0x000000316b86c66e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#28 0x0000003168778182 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#29 0x00000031687783d7 in QEventLoop::exec (this=0x7ffffa133590, flags=...) at kernel/qeventloop.cpp:204
#30 0x000000316877cdd5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#31 0x0000000000402d23 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kdepim-4.8.1/kmail/main.cpp:145
Comment 1 Markus 2012-03-10 13:30:41 UTC
I have the same(?) issue. When I hit reply, the composer opens and when I try to type it will crash with a segfault.

backtrace:
Application: KMail (kmail), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f8fefbac760 (LWP 5326))]

Thread 5 (Thread 0x7f8fd4f8e700 (LWP 5402)):
#0  0x00007f8feacb264c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f8fe19c41ac in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x00007f8feacaddbc in start_thread () from /lib64/libpthread.so.0
#3  0x00007f8fece59ded in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f8fd468d700 (LWP 5503)):
#0  0x00007f8fece50fb3 in poll () from /lib64/libc.so.6
#1  0x00007f8fe573c554 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f8fe573c9bf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f8fed7e4f96 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f8fed7b4cf2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007f8fed7b4fe5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007f8fed6b2888 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007f8fed6b4f67 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007f8feacaddbc in start_thread () from /lib64/libpthread.so.0
#9  0x00007f8fece59ded in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f8fd2fdb700 (LWP 11764)):
#0  0x00007f8fece50fb3 in poll () from /lib64/libc.so.6
#1  0x00007f8fe573c554 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f8fe573c9bf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f8fed7e4f96 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f8fed7b4cf2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007f8fed7b4fe5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007f8fed6b2888 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007f8fed793b20 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007f8fed6b4f67 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007f8feacaddbc in start_thread () from /lib64/libpthread.so.0
#10 0x00007f8fece59ded in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f8f8ad47700 (LWP 1736)):
#0  0x00007f8feacb29cb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f8fed6b5d7e in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f8fed6a93ff in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007f8fed6b4f67 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f8feacaddbc in start_thread () from /lib64/libpthread.so.0
#5  0x00007f8fece59ded in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f8fefbac760 (LWP 5326)):
[KCrash Handler]
#6  0x00007f8fef6083cb in Sonnet::Highlighter::eventFilter(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#7  0x00007f8fed7b5ee6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007f8fedcf2d13 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#9  0x00007f8fedcf7ffa in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#10 0x00007f8fef5ac0e8 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#11 0x00007f8fed7b5d4b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#12 0x00007f8fedd94e53 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007f8fedd95256 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#14 0x00007f8fedd716a2 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007f8fedd99322 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007f8fe573c01a in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#17 0x00007f8fe573c828 in ?? () from /usr/lib64/libglib-2.0.so.0
#18 0x00007f8fe573c9bf in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#19 0x00007f8fed7e4f5a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#20 0x00007f8fedd98fe6 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007f8fed7b4cf2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#22 0x00007f8fed7b4fe5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#23 0x00007f8fed7b97db in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#24 0x00000000004033d2 in _start ()
Comment 2 Markus 2012-03-10 16:47:40 UTC
Sometimes selecting a different identity in the composer prevents the crash.
Btw, I use kde-4.8.1 and have not experienced such behaviour before in 4.8.0.
Comment 3 kavol 2012-03-12 11:09:00 UTC
Created attachment 69530 [details]
New crash information added by DrKonqi

kmail (4.8.0) on KDE Platform 4.8.1 (4.8.1) using Qt 4.8.0

- What I was doing when the application crashed:

I've tried to write a new e-mail, and kmail crashes when trying to write subject line

-- Backtrace (Reduced):
#6  0x00000038896abfb3 in eventFilter (e=0x7fffacd28fa0, o=0x15b7130, this=0x1ea2b50) at /usr/src/debug/kdelibs-4.8.1/kdeui/sonnet/highlighter.cpp:355
#7  Sonnet::Highlighter::eventFilter (this=0x1ea2b50, o=0x15b7130, e=0x7fffacd28fa0) at /usr/src/debug/kdelibs-4.8.1/kdeui/sonnet/highlighter.cpp:337
#8  0x00000031687791d8 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x15b7130, event=0x7fffacd28fa0) at kernel/qcoreapplication.cpp:986
#9  0x000000316b7c995f in notify_helper (e=0x7fffacd28fa0, receiver=0x15b7130, this=0x1027460) at kernel/qapplication.cpp:4546
#10 QApplicationPrivate::notify_helper (this=0x1027460, receiver=0x15b7130, e=0x7fffacd28fa0) at kernel/qapplication.cpp:4522
Comment 4 kavol 2012-03-13 14:58:24 UTC
Created attachment 69577 [details]
valgrind log from the crash

$ valgrind --log-file=kmail.log kmail
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kmail2(1642): No language dictionaries for the language :  "cs" 

kmail2(1642): No language dictionaries for the language :  "cs" 

loaded the Generic plugin 
kmail2(1642)/kdepimlibs (mailtransport): Could not access Outbox. 
$ kmail2(1642): No language dictionaries for the language :  "cs" 

kmail2(1642): No language dictionaries for the language :  "cs" 

Enchant dict for "en_GB" 0x8006bd0 
*** KMail got signal 11 (Exiting)
Comment 5 kavol 2012-03-13 15:01:57 UTC
note that downgrading to kdepim 4.8.0 doesn't help the issue - the crash seems to come from kdelibs (I haven't tried to downgrade also kdelibs yet due to dependency hell)
Comment 6 kavol 2012-03-13 15:08:13 UTC
Created attachment 69579 [details]
better log (with --track-origins=yes)
Comment 7 kavol 2012-03-14 12:30:06 UTC
this problem seems to go away if you set a generic language instead of country-specific variant within identity properties

I had "Anglický (Spojené království)" and after setting this to "Český" the problem went away

I can re-trigger this problem by selecting any other option than "Český" - i.e. all those in the "Language (country)" form

for more examples see bug #295759 comment #2 and comment #3
Comment 8 Franz Trischberger 2012-03-15 07:33:59 UTC
The problem is caused by a return-statement in the Sonnet::Highlighter-constructor, leaving Sonnet::Highlighter::d->rehighlightRequest uninitialised.
Downstream report:
https://bugs.gentoo.org/show_bug.cgi?id=407709
attached patch fixed the crash.
Comment 9 Laurent Montel 2012-03-19 11:32:24 UTC
Git commit 20f73c2150bcd2220fe3604c2ec251b4026a3891 by Montel Laurent.
Committed on 19/03/2012 at 12:30.
Pushed by mlaurent into branch 'KDE/4.8'.

Fix Bug 295615 - kmail crashes trying to edit subject/message body with

some dictionary languages set in identity properties

Patch from Matt Whitlock from https://bugs.gentoo.org/show_bug.cgi?id=407709
it's right timer can be uninitialize when we change language => it will
crash

FIXED-IN: 4.8.2

M  +4    -3    kdeui/sonnet/highlighter.cpp

http://commits.kde.org/kdelibs/20f73c2150bcd2220fe3604c2ec251b4026a3891
Comment 10 kavol 2012-03-21 11:44:35 UTC
cool, thanks guys!
Comment 11 Ivan Čukić 2012-04-16 20:47:41 UTC
Git commit 9d546d3110a4db3b51064d6a8c9e83b5d53976ed by Ivan Čukić, on behalf of Montel Laurent.
Committed on 19/03/2012 at 12:30.
Pushed by ivan into branch 'ivan/solid-fuse-access'.

Fix Bug 295615 - kmail crashes trying to edit subject/message body with

some dictionary languages set in identity properties

Patch from Matt Whitlock from https://bugs.gentoo.org/show_bug.cgi?id=407709
it's right timer can be uninitialize when we change language => it will
crash

FIXED-IN: 4.8.2

M  +4    -3    kdeui/sonnet/highlighter.cpp

http://commits.kde.org/kdelibs/9d546d3110a4db3b51064d6a8c9e83b5d53976ed