Bug 311787

Summary: kndoe crash, when news server unavailable
Product: knode Reporter: Russ Fineman <upscope>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: 4.9   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.9.5

Description Russ Fineman 2012-12-16 17:25:06 UTC
Application: kontact (4.9.4)
KDE Platform Version: 4.9.4 "release 5"
Qt Version: 4.8.3
Operating System: Linux 3.4.11-2.16-desktop x86_64
Distribution: "openSUSE 12.2 (x86_64)"

-- Information about the crash:
- newsserver 1 was unavailble, answer message and clicked to move to next news server account

The crash can be reproduced every time.

-- Backtrace:
Application: Kontact (kontact), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f457a4a9780 (LWP 4727))]

Thread 3 (Thread 0x7f4561826700 (LWP 4729)):
#0  0x00007f45722bf8f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f4576cadeb7 in ?? () from /usr/lib64/libQtWebKit.so.4
#2  0x00007f4576cadee9 in ?? () from /usr/lib64/libQtWebKit.so.4
#3  0x00007f45722bbe0e in start_thread () from /lib64/libpthread.so.0
#4  0x00007f4577a0f2cd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f4560f25700 (LWP 4730)):
#0  0x00007f4577a0714f in poll () from /lib64/libc.so.6
#1  0x00007f4571d10684 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f4571d107a4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f4578182cf6 in QEventDispatcherGlib::processEvents (this=0x7f455c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f457815385f in QEventLoop::processEvents (this=this@entry=0x7f4560f24e00, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f4578153ae8 in QEventLoop::exec (this=0x7f4560f24e00, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f4578055fc0 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f4578058f9c in QThreadPrivate::start (arg=0x179bb70) at thread/qthread_unix.cpp:338
#8  0x00007f45722bbe0e in start_thread () from /lib64/libpthread.so.0
#9  0x00007f4577a0f2cd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f457a4a9780 (LWP 4727)):
[KCrash Handler]
#6  shared_count (r=..., this=<optimized out>) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:311
#7  shared_ptr (this=<optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:164
#8  displayedReference (this=0x0) at /usr/src/debug/kdepim-4.9.4/knode/knarticle.h:147
#9  KNArticleManager::createCompleteThread (this=this@entry=0x21bd3a0, a=...) at /usr/src/debug/kdepim-4.9.4/knode/knarticlemanager.cpp:962
#10 0x00007f4512fae0ae in KNArticleManager::showHdrs (this=0x21bd3a0, clear=<optimized out>) at /usr/src/debug/kdepim-4.9.4/knode/knarticlemanager.cpp:291
#11 0x00007f4512f7a203 in KNGroupManager::expireGroupNow (this=0x21bb0b0, g=...) at /usr/src/debug/kdepim-4.9.4/knode/kngroupmanager.cpp:538
#12 0x00007f4512ffb859 in KNMainWidget::slotGrpExpire (this=0x204d110) at /usr/src/debug/kdepim-4.9.4/knode/knmainwidget.cpp:1446
#13 0x00007f457816b39f in QMetaObject::activate (sender=0x21e3220, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff60a10d60) at kernel/qobject.cpp:3556
#14 0x00007f4578b4e542 in QAction::triggered (this=this@entry=0x21e3220, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#15 0x00007f4578b4e730 in QAction::activate (this=0x21e3220, event=<optimized out>) at kernel/qaction.cpp:1257
#16 0x00007f4578f87dc3 in QMenuPrivate::activateCausedStack (this=this@entry=0x2222d40, causedStack=..., action=action@entry=0x21e3220, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1028
#17 0x00007f4578f8e0d9 in QMenuPrivate::activateAction (this=0x2222d40, action=0x21e3220, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1120
#18 0x00007f45799207c0 in KMenu::mouseReleaseEvent (this=0x1e4bdd0, e=0x7fff60a11900) at /usr/src/debug/kdelibs-4.9.4/kdeui/widgets/kmenu.cpp:464
#19 0x00007f4578ba3ed0 in QWidget::event (this=0x1e4bdd0, event=0x7fff60a11900) at kernel/qwidget.cpp:8371
#20 0x00007f4578f8f38b in QMenu::event (this=0x1e4bdd0, e=0x7fff60a11900) at widgets/qmenu.cpp:2469
#21 0x00007f4578b5474c in QApplicationPrivate::notify_helper (this=this@entry=0x1687130, receiver=receiver@entry=0x1e4bdd0, e=e@entry=0x7fff60a11900) at kernel/qapplication.cpp:4557
#22 0x00007f4578b5942b in QApplication::notify (this=<optimized out>, receiver=0x1e4bdd0, e=0x7fff60a11900) at kernel/qapplication.cpp:4100
#23 0x00007f4579867616 in KApplication::notify (this=0x7fff60a125d0, receiver=0x1e4bdd0, event=0x7fff60a11900) at /usr/src/debug/kdelibs-4.9.4/kdeui/kernel/kapplication.cpp:311
#24 0x00007f4578154b0e in QCoreApplication::notifyInternal (this=0x7fff60a125d0, receiver=0x1e4bdd0, event=0x7fff60a11900) at kernel/qcoreapplication.cpp:915
#25 0x00007f4578b5558b in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#26 QApplicationPrivate::sendMouseEvent (receiver=0x1e4bdd0, event=0x7fff60a11900, alienWidget=0x0, nativeWidget=0x1e4bdd0, buttonDown=0x7f4579628248 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3168
#27 0x00007f4578bcfbdc in QETWidget::translateMouseEvent (this=this@entry=0x1e4bdd0, event=event@entry=0x7fff60a12070) at kernel/qapplication_x11.cpp:4452
#28 0x00007f4578bceaa1 in QApplication::x11ProcessEvent (this=0x7fff60a125d0, event=0x7fff60a12070) at kernel/qapplication_x11.cpp:3641
#29 0x00007f4578bf4de2 in x11EventSourceDispatch (s=0x1689800, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#30 0x00007f4571d103b5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f4571d106e8 in ?? () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f4571d107a4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#33 0x00007f4578182cd6 in QEventDispatcherGlib::processEvents (this=0x1659b80, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#34 0x00007f4578bf4a5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#35 0x00007f457815385f in QEventLoop::processEvents (this=this@entry=0x7fff60a12440, flags=...) at kernel/qeventloop.cpp:149
#36 0x00007f4578153ae8 in QEventLoop::exec (this=0x7fff60a12440, flags=...) at kernel/qeventloop.cpp:204
#37 0x00007f4578158788 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#38 0x0000000000403649 in ?? ()
#39 0x00007f457794c455 in __libc_start_main () from /lib64/libc.so.6
#40 0x0000000000403bb1 in _start ()

Reported using DrKonqi
Comment 1 Allen Winter 2012-12-22 16:21:19 UTC
Git commit 2fb3e7d88b2353d087211f41368e16117b2be48d by Allen Winter.
Committed on 22/12/2012 at 16:58.
Pushed by winterz into branch 'KDE/4.9'.

in createCompleteThread(), add a crash guard in the case there is no
displayReference, like when the server connection is lost.
FIXED-IN: 4.9.5
MERGE: 4.10, master

M  +4    -0    knode/knarticlemanager.cpp

http://commits.kde.org/kdepim/2fb3e7d88b2353d087211f41368e16117b2be48d