Bug 295759

Summary: Kontact crash when wrting new mail
Product: [Applications] kontact Reporter: franck.wiatrowski
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: forger, kavol, kjetil, m407, mail, xeno
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description franck.wiatrowski 2012-03-11 12:23:36 UTC
Application: kontact (4.8.0)
KDE Platform Version: 4.8.1 (4.8.1) "release 481"
Qt Version: 4.8.0
Operating System: Linux 3.1.9-1.4-desktop x86_64
Distribution: "openSUSE 12.1 (x86_64)"

-- Information about the crash:
- The crash arrive when i write the subject of a mail
- i have 2 account (Gmail & pro), the crash arrive only with the pro account (entreprise mail server : zarafa suite)
- i use OpenSUSE 12.1 distribution with KDE 4.8.1 from upstream repo

The crash can be reproduced every time.

-- Backtrace:
Application: Kontact (kontact), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f51e084c760 (LWP 13146))]

Thread 3 (Thread 0x7f51c7fdf700 (LWP 13147)):
#0  0x00007f51d86dbe6c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f51dd06ac12 in ?? () from /usr/lib64/libQtWebKit.so.4
#2  0x00007f51dd06ac49 in ?? () from /usr/lib64/libQtWebKit.so.4
#3  0x00007f51d86d7f05 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f51ddd5a63d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f51c76c6700 (LWP 13148)):
#0  0x00007f51d86db125 in __pthread_mutex_unlock_usercnt () from /lib64/libpthread.so.0
#1  0x00007f51d81c7a6f in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f51d81c892d in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f51d81c8f59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f51de4c8956 in QEventDispatcherGlib::processEvents (this=0x7f51c00008c0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007f51de498682 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f51de4988d7 in QEventLoop::exec (this=0x7f51c76c5e20, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f51de399537 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x00007f51de39c55b in QThreadPrivate::start (arg=0x6d86a0) at thread/qthread_unix.cpp:298
#9  0x00007f51d86d7f05 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f51ddd5a63d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f51e084c760 (LWP 13146)):
[KCrash Handler]
#6  0x00007f51dfc4b553 in eventFilter (e=0x7fffe80c4a20, o=0x36bf310, this=0x394c000) at /usr/src/debug/kdelibs-4.8.1/kdeui/sonnet/highlighter.cpp:355
#7  Sonnet::Highlighter::eventFilter (this=0x394c000, o=0x36bf310, e=0x7fffe80c4a20) at /usr/src/debug/kdelibs-4.8.1/kdeui/sonnet/highlighter.cpp:337
#8  0x00007f51de499a28 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x36bf310, event=0x7fffe80c4a20) at kernel/qcoreapplication.cpp:986
#9  0x00007f51deeace4f in notify_helper (e=0x7fffe80c4a20, receiver=0x36bf310, this=0x63a560) at kernel/qapplication.cpp:4546
#10 QApplicationPrivate::notify_helper (this=0x63a560, receiver=0x36bf310, e=0x7fffe80c4a20) at kernel/qapplication.cpp:4522
#11 0x00007f51deeb23ce in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffe80c4a20) at kernel/qapplication.cpp:3991
#12 0x00007f51dfbf1656 in KApplication::notify (this=0x7fffe80c5940, receiver=0x36bf310, event=0x7fffe80c4a20) at /usr/src/debug/kdelibs-4.8.1/kdeui/kernel/kapplication.cpp:311
#13 0x00007f51de49989c in QCoreApplication::notifyInternal (this=0x7fffe80c5940, receiver=0x36bf310, event=0x7fffe80c4a20) at kernel/qcoreapplication.cpp:876
#14 0x00007f51def4c1c9 in QKeyMapper::sendKeyEvent (keyWidget=0x36bf310, grab=<optimized out>, type=QEvent::KeyPress, code=16777217, modifiers=..., text=..., autorepeat=false, count=1, nativeScanCode=23, nativeVirtualKey=65289, nativeModifiers=16) at kernel/qkeymapper_x11.cpp:1866
#15 0x00007f51def4c63b in QKeyMapperPrivate::translateKeyEvent (this=0x67c340, keyWidget=0x36bf310, event=0x7fffe80c5500, grab=false) at kernel/qkeymapper_x11.cpp:1836
#16 0x00007f51def28604 in QApplication::x11ProcessEvent (this=0x7fffe80c5940, event=0x7fffe80c5500) at kernel/qapplication_x11.cpp:3524
#17 0x00007f51def50652 in x11EventSourceDispatch (s=0x63e070, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#18 0x00007f51d81c858d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#19 0x00007f51d81c8d88 in ?? () from /usr/lib64/libglib-2.0.so.0
#20 0x00007f51d81c8f59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#21 0x00007f51de4c88ef in QEventDispatcherGlib::processEvents (this=0x60d320, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#22 0x00007f51def502de in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#23 0x00007f51de498682 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#24 0x00007f51de4988d7 in QEventLoop::exec (this=0x7fffe80c58d0, flags=...) at kernel/qeventloop.cpp:204
#25 0x00007f51de49d435 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#26 0x0000000000403919 in ?? ()
#27 0x00007f51ddca223d in __libc_start_main () from /lib64/libc.so.6
#28 0x0000000000403e51 in _start ()

Possible duplicates by query: bug 295091.

Reported using DrKonqi
Comment 1 Stanislav Sidorenko 2012-03-11 13:17:42 UTC
Created attachment 69494 [details]
New crash information added by DrKonqi

kontact (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:

Default message format is plain text.

1) Create a new email message.
2) Switch the format of newly created message from plain text to html.
3) Try to type something in the message text field.

Kmail/Kontact crashes.

-- Backtrace (Reduced):
#6  0x00007f5d5cb3c5e3 in eventFilter (e=0x7fffc4645f20, o=0x11f32b0, this=0x3187100) at ../../kdeui/sonnet/highlighter.cpp:355
#7  Sonnet::Highlighter::eventFilter (this=0x3187100, o=0x11f32b0, e=0x7fffc4645f20) at ../../kdeui/sonnet/highlighter.cpp:337
#8  0x00007f5d5b3bb788 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x11f32b0, event=0x7fffc4645f20) at kernel/qcoreapplication.cpp:986
#9  0x00007f5d5bdaf0cf in notify_helper (e=0x7fffc4645f20, receiver=0x11f32b0, this=0x7b52c0) at kernel/qapplication.cpp:4551
#10 QApplicationPrivate::notify_helper (this=0x7b52c0, receiver=0x11f32b0, e=0x7fffc4645f20) at kernel/qapplication.cpp:4527
Comment 2 franck.wiatrowski 2012-03-11 13:29:10 UTC
Bug resolved but if someone could have an explanation :
I see that i have two dictionnaries for my language in identities setup (my language is french and i have "Français" & "Français/France") 
"Français/France" was selected, and crash happens, when i selected other option : "Français", no more crash when writing!
Comment 3 Kjetil Kilhavn 2012-03-13 08:42:14 UTC
I can confirm that the dictionary change solved the problem for me as well (openSUSE 12.1, KDE 4.8.1 from openSUSE's KDE Release 4.8 repositories).
I had the two dictionaries "Norsk (bokmål)" and "Norsk (bokmål) (Norge)", and selecting "Norsk (bokmål)" solved the problem.

Looking the the System Settings, I see that for the default spell check it is "Norsk (bokmål)" which is selected, but "Norsk (bokmål) (Norge)" is available - as well as "Engelsk (USA)" which seems impossible to get rid off even if I install proper English (i.e. the British English).

Could the error be caused by a migration which forgot to update KMail's identity settings?

I think it would be an improvement if we could select "System default" as language in KMail's identities settings. That way, if my preferred language became available after installation I could switch the language in the system settings and KMail would be using the new dictionary as well.
Comment 4 S.Trzmiel 2012-03-13 15:17:33 UTC
*** Bug 295636 has been marked as a duplicate of this bug. ***
Comment 5 Forger 2012-03-14 08:26:30 UTC
Created attachment 69601 [details]
New crash information added by DrKonqi

kontact (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 was trying to type reply to an email. This happens every time and makes Kmail unusable.

-- Backtrace (Reduced):
#6  0x00007f27996fc383 in eventFilter (e=0x7fff19542970, o=0xd915340, this=0xead2560) at ../../kdeui/sonnet/highlighter.cpp:355
#7  Sonnet::Highlighter::eventFilter (this=0xead2560, o=0xd915340, e=0x7fff19542970) at ../../kdeui/sonnet/highlighter.cpp:337
#8  0x00007f2797f74678 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0xd915340, event=0x7fff19542970) at kernel/qcoreapplication.cpp:986
#9  0x00007f279896967f in notify_helper (e=0x7fff19542970, receiver=0xd915340, this=0x1bf2e00) at kernel/qapplication.cpp:4551
#10 QApplicationPrivate::notify_helper (this=0x1bf2e00, receiver=0xd915340, e=0x7fff19542970) at kernel/qapplication.cpp:4527
Comment 6 S.Trzmiel 2012-03-14 09:15:30 UTC
Try to set and save your spellcheck/dictionary settings. It solved this issue for me.
Comment 7 kavol 2012-03-14 12:03:34 UTC
(In reply to comment #3)
> Could the error be caused by a migration which forgot to update KMail's
> identity settings?

no, the error is caused by bad programming practices

you can work around the bug by setting "Norsk (bokmål)" instead of "Norsk (bokmål) (Norge)" - but if you manually switch back to "Norsk (bokmål) (Norge)" you'll see the bug again ... you can hardly accuse the migration process in this case if you just select something within the configuration dialogue

btw, this is duplicate of bug #295615
Comment 8 Andre 2012-03-27 18:14:43 UTC
Created attachment 69942 [details]
New crash information added by DrKonqi

kontact (4.8.0) on KDE Platform 4.8.1 (4.8.1) "release 483" using Qt 4.8.0

1. Got an e-mail
2. Pressed reply
3. Wrote a line of text
4. Hit Enter to begin a new line

Then application crashed.

-- Backtrace (Reduced):
#6  0x00007f5ec11d5553 in eventFilter (e=0x7fffb7e61bc0, o=0xc081e0, this=0x14a4750) at /usr/src/debug/kdelibs-4.8.1/kdeui/sonnet/highlighter.cpp:355
#7  Sonnet::Highlighter::eventFilter (this=0x14a4750, o=0xc081e0, e=0x7fffb7e61bc0) at /usr/src/debug/kdelibs-4.8.1/kdeui/sonnet/highlighter.cpp:337
#8  0x00007f5ebfa23a28 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0xc081e0, event=0x7fffb7e61bc0) at kernel/qcoreapplication.cpp:986
#9  0x00007f5ec0436e4f in notify_helper (e=0x7fffb7e61bc0, receiver=0xc081e0, this=0x6422f0) at kernel/qapplication.cpp:4546
#10 QApplicationPrivate::notify_helper (this=0x6422f0, receiver=0xc081e0, e=0x7fffb7e61bc0) at kernel/qapplication.cpp:4522
Comment 9 Andre 2012-03-28 16:28:54 UTC
Set and save spellcheck/dictionary settings solved this issue for me too!
Comment 10 Christophe Marin 2012-03-30 13:35:19 UTC
Fixed in kdelibs 4.8.2 (will be released next week)

*** This bug has been marked as a duplicate of bug 297062 ***