Bug 284939 - ~Objecttreeparser invalid pointer on multipart or signed data
Summary: ~Objecttreeparser invalid pointer on multipart or signed data
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: messageviewer (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Torgny Nyblom
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 16:29 UTC by Torgny Nyblom
Modified: 2011-10-30 18:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torgny Nyblom 2011-10-25 16:29:50 UTC
Application: kmail (4.8 pre)
KDE Platform Version: 4.7.2 (4.7.2) (Compiled from sources)
Qt Version: 4.7.4
Operating System: Linux 3.0.6-gentoo x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
ObjectTreeParser::~ObjectTreeParser()
{
  if ( mDeleteNodeHelper ) {
    delete mNodeHelper; //BUG: ObjectTreeParserTester::test_parseEncapsulatedMessage() crashes with an invalid pointer
    mNodeHelper = 0;
  }
  if( isInternalSource ) {
    delete mSource;
    mSource = 0;
  }
}

The crash can be reproduced every time.

-- Backtrace:
Application: KMail (kmail), signal: Aborted
[Current thread is 1 (Thread 0x7f74bea0f760 (LWP 13442))]

Thread 3 (Thread 0x7f74a5fe0700 (LWP 13447)):
#0  0x00007f74b8adc47c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f74b226e3b4 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x00007f74b8ad7c6c in start_thread () from /lib64/libpthread.so.0
#3  0x00007f74b807b4bd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f74a56df700 (LWP 13448)):
#0  0x00007f74b80726f3 in poll () from /lib64/libc.so.6
#1  0x00007f74aed8e743 in g_main_context_iterate.clone.6 () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f74aed8ec11 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f74b8e7acb6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f74b8e4eee2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007f74b8e4f12c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007f74b8d64704 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007f74b8d66f65 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007f74b8ad7c6c in start_thread () from /lib64/libpthread.so.0
#9  0x00007f74b807b4bd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f74bea0f760 (LWP 13442)):
[KCrash Handler]
#6  0x00007f74b7fd6b05 in raise () from /lib64/libc.so.6
#7  0x00007f74b7fd7f86 in abort () from /lib64/libc.so.6
#8  0x00007f74b8011cc3 in ?? () from /lib64/libc.so.6
#9  0x00007f74b8017156 in ?? () from /lib64/libc.so.6
#10 0x00007f74b2d463c3 in MessageViewer::ObjectTreeParser::~ObjectTreeParser (this=0x7fff1b22f1e0, __in_chrg=<optimized out>) at /code/kde/src/kde/kdepim/messageviewer/objecttreeparser.cpp:225
#11 0x00007f74b2d5855f in MessageViewer::ObjectTreeParser::writeOpaqueOrMultipartSignedData (this=0x7fff1b22fc30, data=0x5de3bf0, sign=..., fromAddress=..., doCheck=true, cleartextData=0x0, paramSignatures=std::vector of length 0, capacity 0, hideErrors=false) at /code/kde/src/kde/kdepim/messageviewer/objecttreeparser.cpp:832
#12 0x00007f74b2d5bb95 in MessageViewer::ObjectTreeParser::processMultiPartSignedSubtype (this=0x7fff1b22fc30, node=0x39f8e30) at /code/kde/src/kde/kdepim/messageviewer/objecttreeparser.cpp:1578
#13 0x00007f74b2d53b56 in MessageViewer::ObjectTreeParser::parseObjectTreeInternal (this=0x7fff1b22fc30, node=0x39f8e30) at /code/kde/src/kde/kdepim/messageviewer/objecttreeparser.cpp:360
#14 0x00007f74b2d872bc in MessageViewer::ViewerPrivate::parseContent (this=0x282a9d0, content=0x39f8e30) at /code/kde/src/kde/kdepim/messageviewer/viewer_p.cpp:866
#15 0x00007f74b2d89f32 in MessageViewer::ViewerPrivate::displayMessage (this=0x282a9d0) at /code/kde/src/kde/kdepim/messageviewer/viewer_p.cpp:738
#16 0x00007f74b2d8a646 in MessageViewer::ViewerPrivate::updateReaderWin (this=0x282a9d0) at /code/kde/src/kde/kdepim/messageviewer/viewer_p.cpp:2010
#17 0x00007f74b2d8d8dd in MessageViewer::ViewerPrivate::qt_metacall (this=0x282a9d0, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0x7fff1b230150) at /code/kde/build/kde/kdepim/messageviewer/viewer_p.moc:226
#18 0x00007f74b8e6444f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#19 0x00007f74b8e63c79 in QObject::event(QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#20 0x00007f74b9b3ee74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007f74b9b43a3a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#22 0x00007f74be4190d6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#23 0x00007f74b8e4fb4c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#24 0x00007f74b8e7d77e in ?? () from /usr/lib64/qt4/libQtCore.so.4
#25 0x00007f74b8e7a564 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#26 0x00007f74aed8e22f in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#27 0x00007f74aed8ea38 in g_main_context_iterate.clone.6 () from /usr/lib64/libglib-2.0.so.0
#28 0x00007f74aed8ec11 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#29 0x00007f74b8e7ac5f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#30 0x00007f74b9be459e in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtGui.so.4
#31 0x00007f74b8e4eee2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#32 0x00007f74b8e4f12c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#33 0x00007f74b8e535fb in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#34 0x00000000004032fe in main (argc=<optimized out>, argv=<optimized out>) at /code/kde/src/kde/kdepim/kmail/main.cpp:145

Reported using DrKonqi
Comment 1 Laurent Montel 2011-10-30 14:08:25 UTC
Could you send me in private email which create crash please ?
(and how to reproduce bug ?)
Regards
Comment 2 Torgny Nyblom 2011-10-30 18:53:24 UTC
Fixed when redoing the GSoC branch merge.