Bug 74558

Summary: KNotes crashes when switching between notes
Product: [Applications] kontact Reporter: Lukáš Tinkl <lukas>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Lukáš Tinkl 2004-02-08 11:55:55 UTC
Version:            (using KDE KDE 3.2.0)
Compiler:          gcc (GCC) 3.3.1 (SuSE Linux) 
OS:          Linux

When switching between notes, the KNotes part crashes (upon saving the note I suspect); BT below...


[New Thread 16384 (LWP 7969)]
0x41583fd6 in waitpid () from /lib/libpthread.so.0
#0  0x41583fd6 in waitpid () from /lib/libpthread.so.0
#1  0x40a92c44 in KCrash::defaultCrashHandler(int) ()
   from /opt/kde3/lib/libkdecore.so.4
#2  0x41582bb1 in __pthread_sighandler () from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x00000141 in ?? ()
#5  0x401ab1c9 in KCal::ICalFormat::~ICalFormat() ()
   from /opt/kde3/lib/libkcal.so.2
#6  0x08060844 in KNotesApp::saveNotes() ()
#7  0x0806111f in KNotesApp::qt_invoke(int, QUObject*) ()
#8  0x40ec1270 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#9  0x40ec1060 in QObject::activate_signal(int) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#10 0x0806741c in KNote::sigSaveData() ()
#11 0x08064b14 in KNote::saveData() ()
#12 0x0805fb9e in KNotesApp::setText(QString const&, QString const&) ()
#13 0x0806f6e2 in KNotesIface::process(QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&) ()
#14 0x40b80565 in DCOPClient::receive(QCString const&, QCString const&, QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&) ()
   from /opt/kde3/lib/libDCOP.so.4
#15 0x40b7a90c in DCOPProcessInternal(DCOPClientPrivate*, int, unsigned long, QMemArray<char> const&, bool) () from /opt/kde3/lib/libDCOP.so.4
#16 0x40b79f3d in DCOPProcessMessage(_IceConn*, void*, int, unsigned long, int, IceReplyWaitInfo*, int*) () from /opt/kde3/lib/libDCOP.so.4
#17 0x40b8ae04 in KDE_IceProcessMessages () from /opt/kde3/lib/libDCOP.so.4
#18 0x40b81ace in DCOPClient::processSocketData(int) ()
   from /opt/kde3/lib/libDCOP.so.4
#19 0x40b82ef3 in DCOPClient::qt_invoke(int, QUObject*) ()
   from /opt/kde3/lib/libDCOP.so.4
#20 0x40ec1270 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#21 0x40ec13aa in QObject::activate_signal(int, int) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#22 0x411b3778 in QSocketNotifier::activated(int) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#23 0x40edba71 in QSocketNotifier::event(QEvent*) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#24 0x40e65a51 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#25 0x40e65037 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#26 0x409f436d in KApplication::notify(QObject*, QEvent*) ()
   from /opt/kde3/lib/libkdecore.so.4
#27 0x40e557be in QEventLoop::activateSocketNotifiers() ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#28 0x40e13072 in QEventLoop::processEvents(unsigned) ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#29 0x40e7863c in QEventLoop::enterLoop() ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#30 0x40e78534 in QEventLoop::exec() ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#31 0x40e65ce0 in QApplication::exec() ()
   from /usr/local/src/cvs/qt-copy/lib/libqt-mt.so.3
#32 0x0806d1d9 in main ()
Comment 1 Lukáš Tinkl 2004-02-10 14:04:08 UTC
CVS commit by lukas: 

cvs -f diff -kk -bp -u -r1.65 -r1.65.4.1 knotesapp.cpp | patch -p0 -R

doesn't crash anymore (this should be forward ported to HEAD)

CCMAIL: bo@sonofthor.dk, montel@kde.org, 74558-done@bugs.kde.org


  M +1 -3      knotesapp.cpp   1.65.4.2


--- kdepim/knotes/knotesapp.cpp  #1.65.4.1:1.65.4.2
@@ -481,6 +481,4 @@ void KNotesApp::saveConfig()
 void KNotesApp::saveNotes()
 {
-    ICalFormat format;
-
     QString file = KGlobal::dirs()->saveLocation( "appdata" ) + "notes.ics";
     QString backup = file + "~";
@@ -492,5 +490,5 @@ void KNotesApp::saveNotes()
         KMessageBox::error(0, i18n("<qt>Unable to save the notes backup to <b>%1</b>! Check that there is sufficient disk space.</qt>")
                                   .arg( backup ) );
-    else if ( !m_calendar.save( file, &format ) )
+    else if ( !m_calendar.save( file, new ICalFormat() ) )
         KMessageBox::error(0, i18n("<qt>Unable to save the notes to <b>%1</b>! Check that there is sufficient disk space.<br>"
                                    "There should be a backup in <b>%2</b> though.</qt>")