Bug 223809 - Printing crash KMail
Summary: Printing crash KMail
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: messageviewer (show other bugs)
Version: 4.5
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: akonadi-ports-regression
Depends on:
Blocks: 223438
  Show dependency treegraph
 
Reported: 2010-01-22 17:39 UTC by Thomas McGuire
Modified: 2012-03-08 21:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas McGuire 2010-01-22 17:39:04 UTC
When attempting to print, KMail freezes and stays frozen.
Comment 1 Torgny Nyblom 2010-01-24 10:37:50 UTC
Seems to deadlock due to a KJob for akonadi inside a KJob for akonadi. (#8 and #29)
-----
FancyHeaderStyle::format()
  Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
  job->setQuery( Akonadi::ContactSearchJob::Email, KPIMUtils::firstEmailAddress( message->from()->asUnicodeString() ) );
->  if ( !job->exec() )
    return QString();

  const KABC::Addressee::List addresses = job->contacts();
-----

(gdb) bt
#0  0x00007ffff3ba4273 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, 
    timeout=9999) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fffecadc5cc in g_main_context_poll (context=0x44a520, block=<value optimized out>, 
    dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2904
#2  g_main_context_iterate (context=0x44a520, block=<value optimized out>, 
    dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2586
#3  0x00007fffecadc910 in IA__g_main_context_iteration (context=0x44a520, may_block=1)
    at gmain.c:2654
#4  0x00007ffff49ae543 in QEventDispatcherGlib::processEvents (this=0x4441c0, 
    flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407
#5  0x00007ffff56a8fde in QGuiEventDispatcherGlib::processEvents (this=0x9d94e0, 
    flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#6  0x00007ffff4983a32 in QEventLoop::processEvents (this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
)
    at kernel/qeventloop.cpp:149
#7  0x00007ffff4983e04 in QEventLoop::exec (this=0x7fffffff1330, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
)
    at kernel/qeventloop.cpp:201
#8  0x00007ffff74eb8c8 in KJob::exec (this=0x104b860)
    at /home/kde-trunk/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:204
#9  0x00007ffff11d373c in MessageViewer::FancyHeaderStyle::format (this=0x7c8c90, message=..., 
    strategy=0x5f7730, vCardName=..., printing=true, topLevel=true)
    at /home/kde-trunk/src/KDE/kdepim/messageviewer/headerstyle.cpp:496
#10 0x00007ffff11aef6c in MessageViewer::ViewerPrivate::writeMsgHeader (this=0xfffcc0, aMsg=..., 
    vCardNode=0x0, topLevel=true) at /home/kde-trunk/src/KDE/kdepim/messageviewer/viewer_p.cpp:1268
#11 0x00007ffff11adfda in MessageViewer::ViewerPrivate::parseMsg (this=0xfffcc0)
---Type <return> to continue, or q <return> to quit---
    at /home/kde-trunk/src/KDE/kdepim/messageviewer/viewer_p.cpp:1162
#12 0x00007ffff11ad737 in MessageViewer::ViewerPrivate::displayMessage (this=0xfffcc0)
    at /home/kde-trunk/src/KDE/kdepim/messageviewer/viewer_p.cpp:1109
#13 0x00007ffff11b94d2 in MessageViewer::ViewerPrivate::updateReaderWin (this=0xfffcc0)
    at /home/kde-trunk/src/KDE/kdepim/messageviewer/viewer_p.cpp:2321
#14 0x00007ffff11b87a1 in MessageViewer::ViewerPrivate::update (this=0xfffcc0, 
    updateMode=MessageViewer::Viewer::Force)
    at /home/kde-trunk/src/KDE/kdepim/messageviewer/viewer_p.cpp:2180
#15 0x00007ffff11b07b0 in MessageViewer::ViewerPrivate::setMessageItem (this=0xfffcc0, item=..., 
    updateMode=MessageViewer::Viewer::Force)
    at /home/kde-trunk/src/KDE/kdepim/messageviewer/viewer_p.cpp:1517
#16 0x00007ffff11b0153 in MessageViewer::ViewerPrivate::printMessage (this=0xfffcc0, message=...)
    at /home/kde-trunk/src/KDE/kdepim/messageviewer/viewer_p.cpp:1478
#17 0x00007ffff11c9557 in MessageViewer::Viewer::printMessage (this=0xf09c30, msg=...)
    at /home/kde-trunk/src/KDE/kdepim/messageviewer/viewer.cpp:94
#18 0x00007ffff702095b in KMPrintCommand::execute (this=0xffd5c0)
    at /home/kde-trunk/src/KDE/kdepim/kmail/kmcommands.cpp:1592
#19 0x00007ffff70160bc in KMCommand::slotPostTransfer (this=0xffd5c0, result=KMCommand::OK)
    at /home/kde-trunk/src/KDE/kdepim/kmail/kmcommands.cpp:262
#20 0x00007ffff702abc9 in KMCommand::qt_metacall (this=0xffd5c0, _c=QMetaObject::InvokeMetaMethod, 
    _id=5, _a=0x7fffffffc6e0) at /home/kde-trunk/build/KDE/kdepim/kmail/kmcommands.moc:93
#21 0x00007ffff702c27b in KMPrintCommand::qt_metacall (this=0xffd5c0, 
    _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fffffffc6e0)
    at /home/kde-trunk/build/KDE/kdepim/kmail/kmcommands.moc:1348
---Type <return> to continue, or q <return> to quit---
#22 0x00007ffff4997d43 in QMetaObject::activate (sender=0xffd5c0, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3294
#23 0x00007ffff702ac5c in KMCommand::messagesTransfered (this=0xffd5c0, _t1=KMCommand::OK)
    at /home/kde-trunk/build/KDE/kdepim/kmail/kmcommands.moc:108
#24 0x00007ffff70166de in KMCommand::slotJobFinished (this=0xffd5c0)
    at /home/kde-trunk/src/KDE/kdepim/kmail/kmcommands.cpp:375
#25 0x00007ffff702abf6 in KMCommand::qt_metacall (this=0xffd5c0, _c=QMetaObject::InvokeMetaMethod, 
    _id=7, _a=0x7fffffffc8c0) at /home/kde-trunk/build/KDE/kdepim/kmail/kmcommands.moc:95
#26 0x00007ffff702c27b in KMPrintCommand::qt_metacall (this=0xffd5c0, 
    _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x7fffffffc8c0)
    at /home/kde-trunk/build/KDE/kdepim/kmail/kmcommands.moc:1348
#27 0x00007ffff4997d43 in QMetaObject::activate (sender=0x100d540, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3294
#28 0x00007ffff74ec8cf in KJob::result (this=0x100d540, _t1=0x100d540)
    at /home/kde-trunk/build/KDE/kdelibs/kdecore/kjob.moc:194
#29 0x00007ffff74ebd3d in KJob::emitResult (this=0x100d540)
    at /home/kde-trunk/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:312
#30 0x00007ffff660e2a6 in Akonadi::JobPrivate::handleResponse (this=0x100d570, tag=..., data=...)
    at /home/kde-trunk/src/KDE/kdepimlibs/akonadi/job.cpp:67
#31 0x00007ffff6641861 in Akonadi::SessionPrivate::dataReceived (this=0x5710d0)
    at /home/kde-trunk/src/KDE/kdepimlibs/akonadi/session.cpp:121
#32 0x00007ffff66430b7 in Akonadi::Session::qt_metacall (this=0x5648d0, 
    _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffcc10)
    at /home/kde-trunk/build/KDE/kdepimlibs/akonadi/session.moc:87
---Type <return> to continue, or q <return> to quit---
#33 0x00007ffff4997d43 in QMetaObject::activate (sender=0x5a6c90, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3294
#34 0x00007ffff49e2188 in QIODevice::qt_metacall (this=0x5a6c90, _c=QMetaObject::InvokeMetaMethod, 
    _id=<value optimized out>, _a=0x7fffffffcd50) at .moc/release-shared/moc_qiodevice.cpp:77
#35 0x00007ffff51eba00 in QLocalSocket::qt_metacall (this=0x9d94e0, 
    _c=QMetaObject::QueryPropertyUser, _id=9999, _a=0xffffffffffffffff)
    at .moc/release-shared/moc_qlocalsocket.cpp:81
#36 0x00007ffff4997d43 in QMetaObject::activate (sender=0x5adcc8, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3294
#37 0x00007ffff51e3e1f in QAbstractSocketPrivate::canReadNotification (this=0x5c07e0)
    at socket/qabstractsocket.cpp:626
#38 0x00007ffff51d37c1 in QReadNotifier::event (this=<value optimized out>, e=0x8)
    at socket/qnativesocketengine.cpp:1053
#39 0x00007ffff560ca4c in QApplicationPrivate::notify_helper (this=0x447e20, receiver=0x5777b0, 
    e=0x7fffffffd330) at kernel/qapplication.cpp:4242
#40 0x00007ffff561527a in QApplication::notify (this=0x7fffffffd710, 
    receiver=<value optimized out>, e=0x7fffffffd330) at kernel/qapplication.cpp:4125
#41 0x00007ffff79c4cf7 in KApplication::notify (this=0x7fffffffd710, receiver=0x5777b0, 
    event=0x7fffffffd330) at /home/kde-trunk/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#42 0x00007ffff49850db in QCoreApplication::notifyInternal (this=0x7fffffffd710, 
    receiver=0x5777b0, event=0x7fffffffd330) at kernel/qcoreapplication.cpp:704
#43 0x00007ffff49ae8fa in QCoreApplication::sendEvent (source=0x44b510)
    at ../../src/corelib/kernel/qcoreapplication.h:215
#44 socketNotifierSourceDispatch (source=0x44b510) at kernel/qeventdispatcher_glib.cpp:110
---Type <return> to continue, or q <return> to quit---
#45 0x00007fffecad8e2d in g_main_dispatch (context=0x44a520) at gmain.c:1960
#46 IA__g_main_context_dispatch (context=0x44a520) at gmain.c:2513
#47 0x00007fffecadc7e8 in g_main_context_iterate (context=0x44a520, block=<value optimized out>, 
    dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591
#48 0x00007fffecadc910 in IA__g_main_context_iteration (context=0x44a520, may_block=1)
    at gmain.c:2654
#49 0x00007ffff49ae543 in QEventDispatcherGlib::processEvents (this=0x4441c0, 
    flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407
#50 0x00007ffff56a8fde in QGuiEventDispatcherGlib::processEvents (this=0x9d94e0, 
    flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#51 0x00007ffff4983a32 in QEventLoop::processEvents (this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
)
    at kernel/qeventloop.cpp:149
#52 0x00007ffff4983e04 in QEventLoop::exec (this=0x7fffffffd590, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
)
    at kernel/qeventloop.cpp:201
#53 0x00007ffff4987aeb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#54 0x0000000000401622 in main (argc=2, argv=0x7fffffffd908)
    at /home/kde-trunk/src/KDE/kdepim/kmail/main.cpp:154
Comment 2 Thomas McGuire 2010-01-26 13:19:07 UTC
Same when double-clicking a message to view it in the seperate reader.
Comment 3 Thomas McGuire 2010-01-26 14:59:56 UTC
The freeze is fixed with r1080578.
Now opening the separate reader window works again.
Printing no longer freezes, but now crashes:

#5  0x00007f4860c8b5bf in qt_assert (assertion=0x7f4861ec8302 "pd", file=0x7f4861ec7b44 "painting/qpainter.cpp", line=1712) at global/qglobal.cpp:2013
#6  0x00007f48617ca6b4 in QPainter::begin (this=0x7fff1b84b310, pd=0x0) at painting/qpainter.cpp:1712
#7  0x00007f485915b087 in QWebFrame::print(QPrinter*) const () from /media/kdedev/trunk/src/KDE/kde-qt/lib/libQtWebKit.so.4
#8  0x00007f48591747f5 in QWebView::print(QPrinter*) const () from /media/kdedev/trunk/src/KDE/kde-qt/lib/libQtWebKit.so.4
#9  0x00007f485a532f7c in MessageViewer::ViewerPrivate::slotPrintMsg (this=0xc4bed0) at /media/kdedev/trunk/src/KDE/kdepim/messageviewer/viewer_p.cpp:2499
#10 0x00007f485a550a48 in MessageViewer::ViewerPrivate::qt_metacall (this=0xc4bed0, _c=InvokeMetaMethod, _id=33, _a=0x7fff1b84b550)
    at /media/kdedev/trunk/build/KDE/kdepim/messageviewer/viewer_p.moc:208
#11 0x00007f4860dcb99b in QMetaObject::metacall (object=0xc4bed0, cl=InvokeMetaMethod, idx=37, argv=0x7fff1b84b550) at kernel/qmetaobject.cpp:237
#12 0x00007f4860de0c9a in QMetaObject::activate (sender=0xa602b0, m=0x7f485a821f40, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3275
#13 0x00007f485a55f08a in WebKitPartHtmlWriter::finished (this=0xa602b0) at /media/kdedev/trunk/build/KDE/kdepim/messageviewer/webkitparthtmlwriter.moc:90
#14 0x00007f485a55fe40 in WebKitPartHtmlWriter::end (this=0xa602b0) at /media/kdedev/trunk/src/KDE/kdepim/messageviewer/webkitparthtmlwriter.cpp:93
#15 0x00007f485a55fa70 in WebKitPartHtmlWriter::slotWriteNextHtmlChunk (this=0xa602b0) at /media/kdedev/trunk/src/KDE/kdepim/messageviewer/webkitparthtmlwriter.cpp:126
#16 0x00007f485a55fb18 in WebKitPartHtmlWriter::qt_metacall (this=0xa602b0, _c=InvokeMetaMethod, _id=1, _a=0x7fff1b84b7c0)
    at /media/kdedev/trunk/build/KDE/kdepim/messageviewer/webkitparthtmlwriter.moc:79
#17 0x00007f4860dcb99b in QMetaObject::metacall (object=0xa602b0, cl=InvokeMetaMethod, idx=5, argv=0x7fff1b84b7c0) at kernel/qmetaobject.cpp:237
#18 0x00007f4860de0c9a in QMetaObject::activate (sender=0xa602e8, m=0x7f486113abc0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3275
#19 0x00007f4860e49b82 in QTimer::timeout (this=0xa602e8) at .moc/debug-shared/moc_qtimer.cpp:134
#20 0x00007f4860deb1ea in QTimer::timerEvent (this=0xa602e8, e=0x7fff1b84c370) at kernel/qtimer.cpp:271
#21 0x00007f4860ddb552 in QObject::event (this=0xa602e8, e=0x7fff1b84c370) at kernel/qobject.cpp:1212
#22 0x00007f486160072b in QApplicationPrivate::notify_helper (this=0x64da10, receiver=0xa602e8, e=0x7fff1b84c370) at kernel/qapplication.cpp:4297
#23 0x00007f4861600ba8 in QApplication::notify (this=0x7fff1b84c8e0, receiver=0xa602e8, e=0x7fff1b84c370) at kernel/qapplication.cpp:3701
#24 0x00007f48660fd7d9 in KApplication::notify (this=0x7fff1b84c8e0, receiver=0xa602e8, event=0x7fff1b84c370)
    at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#25 0x00007f4860dc3b81 in QCoreApplication::notifyInternal (this=0x7fff1b84c8e0, receiver=0xa602e8, event=0x7fff1b84c370) at kernel/qcoreapplication.cpp:704
#26 0x00007f48615fdabb in QCoreApplication::sendEvent (receiver=0xa602e8, event=0x7fff1b84c370) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#27 0x00007f4860e0317f in QTimerInfoList::activateTimers (this=0x652d70) at kernel/qeventdispatcher_unix.cpp:603
#28 0x00007f4860e00857 in timerSourceDispatch (source=0x652d10) at kernel/qeventdispatcher_glib.cpp:184
#29 0x00007f4854bf20fb in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#30 0x00007f4854bf58cd in ?? () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f4854bf5a8b in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f4860dff579 in QEventDispatcherGlib::processEvents (this=0x6166b0, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#33 0x00007f48616f3ea3 in QGuiEventDispatcherGlib::processEvents (this=0x6166b0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#34 0x00007f4860dbff7b in QEventLoop::processEvents (this=0x7fff1b84c730, flags=...) at kernel/qeventloop.cpp:149
#35 0x00007f4860dc019f in QEventLoop::exec (this=0x7fff1b84c730, flags=...) at kernel/qeventloop.cpp:201
#36 0x00007f4860dc45cb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#37 0x00007f48616036b0 in QApplication::exec () at kernel/qapplication.cpp:3576
#38 0x0000000000404268 in main (argc=1, argv=0x7fff1b84ca98) at /media/kdedev/trunk/src/KDE/kdepim/kmail/main.cpp:153
Comment 4 Torgny Nyblom 2010-01-28 12:57:51 UTC
SVN commit 1081456 by tnyblom:

Fix printing. This might be an unwanted change as it shows a print preview.
Logic borrowed from Mailody.

BUG: 223809
CCMAIL: mcguire@kde.org



 M  +7 -1      viewer_p.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1081456
Comment 5 Christophe Marin 2012-03-08 21:52:03 UTC
*** Bug 295138 has been marked as a duplicate of this bug. ***