Bug 122961 - crash at log out
Summary: crash at log out
Status: RESOLVED FIXED
Alias: None
Product: kdvi
Classification: Miscellaneous
Component: general (show other bugs)
Version: 1.4
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Stefan Kebekus
URL:
Keywords:
: 129099 132996 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-02 11:54 UTC by Marijn Schouten
Modified: 2017-05-26 18:08 UTC (History)
3 users (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 Marijn Schouten 2006-03-02 11:54:27 UTC
Version:           1.4 (using KDE KDE 3.5.1)
Installed from:    Gentoo Packages
Compiler:          gcc-3.4.5-vanilla 
OS:                Linux

kdvi crashes at logout. Not always but often. Sometimes it takes kicker with it.

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 46912563071424 (LWP 5168)]
[KCrash handler]
#5  0x00002aaaaedfca5f in KViewPart::writeSettings ()
   from /usr/kde/3.5/lib64/kde3/kviewerpart.so
#6  0x00002aaaaedfcfad in KViewPart::~KViewPart ()
   from /usr/kde/3.5/lib64/kde3/kviewerpart.so
#7  0x00002aaaaca5248e in QGList::clear () from /usr/qt/3/lib64/libqt-mt.so.3
#8  0x00002aaaabb26d68 in KLibrary::~KLibrary ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#9  0x00002aaaabb271f5 in KLibLoader::close_pending ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#10 0x00002aaaabb2a809 in KLibLoader::~KLibLoader ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#11 0x00002aaaabae2558 in KLibLoader::cleanUp ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#12 0x00002aaaabb8dbea in KApplication::~KApplication ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#13 0x000000000040ace0 in ?? ()
#14 0x00002aaaae874674 in __libc_start_main () from /lib/tls/libc.so.6
#15 0x000000000040aaaa in ?? ()
#16 0x00007fffffda5f98 in ?? ()
#17 0x000000000000001c in ?? ()
#18 0x0000000000000003 in ?? ()
#19 0x00007fffffda668d in ?? ()
#20 0x00007fffffda6692 in ?? ()
#21 0x00007fffffda669b in ?? ()
#22 0x0000000000000000 in ?? ()
Comment 1 Marijn Schouten 2006-03-17 12:25:12 UTC
another backtrace

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 5075)]
0x00002aaaae98f9d2 in nanosleep () from /lib/libc.so.6
#0  0x00002aaaae98f9d2 in nanosleep () from /lib/libc.so.6
#1  0x00002aaaae98f8a2 in sleep () from /lib/libc.so.6
#2  0x00002aaaabafdbca in KCrash::startDrKonqi ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#3  0x00002aaaabb2008e in KCrash::defaultCrashHandler ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#4  0x00002aaaae0de107 in __pthread_sighandler () from /lib/libpthread.so.0
#5  0x00002aaaae933810 in killpg () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()
Comment 2 Marijn Schouten 2006-04-17 16:00:26 UTC
using 1.4 on kde 3.5.2 kdvi has crashed every time it was open at logout. I would like to know if the above backtraces are enough to track this problem or if I should get another one. I currently don't have debug flag enabled, but I can easily do that.
Comment 3 Wilfried Huss 2006-04-18 09:06:36 UTC
Thank you, for your bugreport.

I thought we already fixed this problem.
It does not crash on my machine, so a full backtrace would really be useful.

Greetings,
Wilfried Huss
Comment 4 Marijn Schouten 2006-04-26 12:18:18 UTC
kdvi 1.4 using kde 3.5.2 doesn't crash every time any more, but is back to crashing often. This is one of the full backtrace it produces. 

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47105727868016 (LWP 5445)]
0x00002ad7a81333f0 in nanosleep () from /lib/libc.so.6
#0  0x00002ad7a81333f0 in nanosleep () from /lib/libc.so.6
#1  0x00002ad7a8133244 in sleep () from /lib/libc.so.6
#2  0x00002ad7a51668db in KCrash::startDrKonqi ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#3  0x00002ad7a5166f10 in KCrash::defaultCrashHandler ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#4  0x00002ad7a80d5640 in killpg () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()
Comment 5 Marijn Schouten 2006-05-05 18:05:02 UTC
Today I got a different backtrace, here it is:

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47199575620720 (LWP 5410)]
[KCrash handler]
#5  0x00002aed82061ca0 in KViewPart::writeSettings ()
   from /usr/kde/3.5/lib64/kde3/kviewerpart.so
#6  0x00002aed8206223f in KViewPart::~KViewPart ()
   from /usr/kde/3.5/lib64/kde3/kviewerpart.so
#7  0x00002aed7fcc1bc4 in QGList::clear () from /usr/qt/3/lib64/libqt-mt.so.3
#8  0x00002aed7edf07ac in ~KLibrary () from /usr/kde/3.5/lib64/libkdecore.so.4
#9  0x00002aed7edb9ad6 in KLibLoader::close_pending ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#10 0x00002aed7edf022a in ~KLibLoader ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#11 0x00002aed7ed7cb56 in KLibLoader::cleanUp ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#12 0x00002aed7edd544e in ~KApplication ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#13 0x000000000040ca6d in main ()
Comment 6 Marijn Schouten 2006-05-17 12:24:59 UTC
I still get the crashes almost always at logout. I'm now on kde 3.5.2 and gcc-4.1.0
Comment 7 Marijn Schouten 2006-06-15 16:37:10 UTC
Still happens on kde 3.5.3. Here is one of the backtraces.

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47939547326256 (LWP 5448)]
[KCrash handler]
#5  0x00002b99cbc58e30 in KViewPart::writeSettings ()
   from /usr/kde/3.5/lib64/kde3/kviewerpart.so
#6  0x00002b99cbc593cf in ~KViewPart ()
   from /usr/kde/3.5/lib64/kde3/kviewerpart.so
#7  0x00002b99c98bc6c4 in QGList::clear () from /usr/qt/3/lib64/libqt-mt.so.3
#8  0x00002b99c89d5e57 in ~KLibrary () from /usr/kde/3.5/lib64/libkdecore.so.4
#9  0x00002b99c89d5566 in KLibLoader::close_pending ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#10 0x00002b99c89e8ea5 in ~KLibLoader ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#11 0x00002b99c8980e76 in KLibLoader::cleanUp ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#12 0x00002b99c8a08ff5 in ~KApplication ()
   from /usr/kde/3.5/lib64/libkdecore.so.4
#13 0x000000000040aa6b in main ()
#14 0x00002b99cb8f4134 in __libc_start_main () from /lib/libc.so.6
#15 0x000000000040a849 in _start ()
Comment 8 Wilfried Huss 2006-06-19 21:52:30 UTC
*** Bug 129099 has been marked as a duplicate of this bug. ***
Comment 9 Marijn Schouten 2006-08-08 16:08:20 UTC
Still happens with kde 3.5.4
Comment 10 Wilfried Huss 2006-08-26 11:06:36 UTC
*** Bug 132996 has been marked as a duplicate of this bug. ***
Comment 11 Wilfried Huss 2006-08-29 18:28:48 UTC
SVN commit 578562 by whuss:

Fix crash on session saving.

BUG: 122961

 M  +26 -28    kviewpart.cpp  


--- branches/KDE/3.5/kdegraphics/kviewshell/kviewpart.cpp #578561:578562
@@ -59,7 +59,7 @@
 KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *parent,
                      const char *name, const QStringList& args)
   : KViewPart_Iface(parent, name), showSidebar(0), saveAction(0), partManager(0),
-    multiPage(0), multiPageLibrary(QString::null), aboutDialog(0)
+    multiPageLibrary(QString::null), aboutDialog(0)
 {
   KGlobal::locale()->insertCatalogue("kviewshell");
 
@@ -146,7 +146,7 @@
       reason = i18n("<qt>The factory does not support creating components of the specified type.</qt>");
       break;
     }
-    
+
     QString text = i18n("<qt><p><b>Problem:</b> The document <b>%1</b> cannot be shown.</p>"
 			"<p><b>Reason:</b> The software component <b>%2</b> which is required to "
 			"display your files could not be initialized. This could point to "
@@ -233,7 +233,7 @@
   media->setItems(items);
   connect (media, SIGNAL(activated(int)), this, SLOT(slotMedia(int)));
 
-  useDocumentSpecifiedSize = new KToggleAction(i18n("&Use Document Specified Paper Size"), 0, this, SLOT(slotShowSidebar()), 
+  useDocumentSpecifiedSize = new KToggleAction(i18n("&Use Document Specified Paper Size"), 0, this, SLOT(slotShowSidebar()),
 					       actionCollection(), "view_use_document_specified_size");
 
   // Zoom Actions
@@ -283,9 +283,9 @@
   //connect(selectionModeAction, SIGNAL(toggled(bool)), this, SLOT(slotEnableSelectionTool(bool)));
 
   // history action
-  backAction = new KAction(i18n("&Back"), "1leftarrow", 0, 
+  backAction = new KAction(i18n("&Back"), "1leftarrow", 0,
                    this, SLOT(mp_doGoBack()), actionCollection(), "go_back");
-  forwardAction = new KAction(i18n("&Forward"), "1rightarrow", 0, 
+  forwardAction = new KAction(i18n("&Forward"), "1rightarrow", 0,
                       this, SLOT(mp_doGoForward()), actionCollection(), "go_forward");
 
   backAction->setEnabled(false);
@@ -338,6 +338,8 @@
 
 KViewPart::~KViewPart()
 {
+  writeSettings();
+
   // Without the next two lines, konqueror crashes when it is quit
   // while displaying a DVI file. I don't really understand
   // why... --Stefan.
@@ -348,7 +350,6 @@
   setManager(0);
   delete partManager;
 
-  writeSettings();
   delete multiPage;
   delete tmpUnzipped;
 }
@@ -420,7 +421,7 @@
   if (s.formatNumber() == -1) {
     if (KGlobal::locale()-> measureSystem() == KLocale::Metric)
       size += QString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0);
-    else 
+    else
       size += QString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2);
   } else {
     size += s.formatName() + "/";
@@ -451,8 +452,8 @@
 void KViewPart::slotFileOpen()
 {
   if ((!multiPage.isNull()) && (multiPage->isModified() == true)) {
-    int ans = KMessageBox::warningContinueCancel( 0, 
-					 i18n("Your document has been modified. Do you really want to open another document?"), 
+    int ans = KMessageBox::warningContinueCancel( 0,
+					 i18n("Your document has been modified. Do you really want to open another document?"),
 					 i18n("Warning - Document Was Modified"),KStdGuiItem::open());
     if (ans == KMessageBox::Cancel)
       return;
@@ -634,7 +635,7 @@
       if (fi.exists())
       {
         m_file = m_file+"."+(*it);
-        break; 
+        break;
       }
     }
 
@@ -665,7 +666,7 @@
       delete tmpUnzipped;
 
     tmpUnzipped = new KTempFile;
-    if (tmpUnzipped == 0L) 
+    if (tmpUnzipped == 0L)
     {
       KMessageBox::error(mainWidget, i18n("<qt><strong>File Error!</strong> Could not create "
                          "temporary file.</qt>"));
@@ -801,7 +802,7 @@
     int error;
     multiPage = static_cast<KMultiPage*>(KParts::ComponentFactory::createInstanceFromService<KParts::ReadOnlyPart>(service, mainWidget,
 														   service->name().utf8(), QStringList(), &error ));
-    
+
     if (multiPage.isNull()) {
       QString reason;
       switch(error) {
@@ -924,13 +925,13 @@
     return false;
 
   if (multiPage->isModified() == true) {
-    int ans = KMessageBox::warningContinueCancel( 0, 
-					 i18n("Your document has been modified. Do you really want to close it?"), 
+    int ans = KMessageBox::warningContinueCancel( 0,
+					 i18n("Your document has been modified. Do you really want to close it?"),
 					 i18n("Document Was Modified"), KStdGuiItem::close());
     if (ans == KMessageBox::Cancel)
       return false;
   }
-  
+
   return closeURL();
 }
 
@@ -939,16 +940,16 @@
 {
   if (multiPage.isNull())
     return false;
-  
+
   if( watch && !m_file.isEmpty() )
     watch->removeFile( m_file );
-  
+
   KParts::ReadOnlyPart::closeURL();
   multiPage->closeURL();
   m_url = QString::null;
   checkActions();
   emit setWindowCaption("");
-  
+
   return true;
 }
 
@@ -962,7 +963,7 @@
     userRequestedPaperSize.setPageSize(media->currentText());
     return;
   }
-  
+
   // If the user has chosen "Custom paper size..", show the paper size
   // dialog. Construct it, if necessary. The paper size dialog will
   // know the address of userRequestedPaperSize and change this
@@ -1007,7 +1008,7 @@
 void KViewPart::goToPage()
 {
   bool ok = false;
-  int p = KInputDialog::getInteger(i18n("Go to Page"), i18n("Page:"), 
+  int p = KInputDialog::getInteger(i18n("Go to Page"), i18n("Page:"),
                                    multiPage->currentPageNumber(), 1, multiPage->numberOfPages(),
                                    1 /*step*/, &ok, mainWidget, "gotoDialog");
   if (ok)
@@ -1023,7 +1024,7 @@
     enableFitToPage(false);
   }
   else if(fitWidthAct -> isChecked())
-  {  
+  {
     fitWidthAct -> setChecked(false);
     enableFitToWidth(false);
   }
@@ -1131,7 +1132,7 @@
 
 void KViewPart::fitToPage()
 {
-  double z = QMIN(multiPage->calculateFitToHeightZoomValue(), 
+  double z = QMIN(multiPage->calculateFitToHeightZoomValue(),
                   multiPage->calculateFitToWidthZoomValue());
 
   // Check if the methods returned usable values. Values that are not
@@ -1356,12 +1357,6 @@
 
 void KViewPart::writeSettings()
 {
-  // if loading the KPart failed - just exit now
-  //if (!showSidebar)
-  //  return;
-
-  multiPage->writeSettings();
-
   KVSPrefs::setPageMarks(showSidebar->isChecked());
   KVSPrefs::setWatchFile(watchAct->isChecked());
   KVSPrefs::setZoom(_zoomVal.value());
@@ -1369,6 +1364,9 @@
   KVSPrefs::setScrollbars(scrollbarHandling->isChecked());
   KVSPrefs::setUseDocumentSpecifiedSize(useDocumentSpecifiedSize->isChecked());
 
+  if (!multiPage.isNull())
+    multiPage->writeSettings();
+
   if (fitPageAct->isChecked())
     KVSPrefs::setFitToPage(KVSPrefs::EnumFitToPage::FitToPage);
   else if(fitWidthAct->isChecked())