Bug 99401 - Konqueror control panel crashes when you "Scan for New Plugins" whilst it is already scanning
Summary: Konqueror control panel crashes when you "Scan for New Plugins" whilst it is ...
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: nspluginscan (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-14 22:26 UTC by monstermunch
Modified: 2005-02-22 20:20 UTC (History)
0 users

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 monstermunch 2005-02-14 22:26:54 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    SuSE RPMs

Open Konqueror, then goto Settings -> Configure Konqueror... -> Plugins. When you click the "Scan for New Plugins..." button, a dialog box pop-ups up with a progress bar which disappears when scanning is finish. However, if you click the button again before the scan is finished, the new dialog box remains stuck (the percentage it stops at varies) after the first one finishes. Clicking the "Cancel" button of the remaining dialog box then causes kcmshell to crash and the control panel disappears. Clicking the scan button twice before the first dialog box finishes causes the same crash immediately.
Comment 1 George Staikos 2005-02-22 20:20:20 UTC
CVS commit by staikos: 

hack around this nastiness to avoid crashes and reentrancy.  yuck.
BUG: 99401


  M +13 -5     pluginopts.cpp   1.44


--- kdebase/kcontrol/konqhtml/pluginopts.cpp  #1.43:1.44
@@ -285,4 +285,5 @@ void KPluginOptions::slotShowDomainDlg()
 void KPluginOptions::scan()
 {
+    m_widget->scanButton->setEnabled(false);
     if ( m_changed ) {
         int ret = KMessageBox::warningYesNoCancel( this,
@@ -290,5 +291,8 @@ void KPluginOptions::scan()
                                                          "before the scan? Otherwise the "
                                                          "changes will be lost.") );
-        if ( ret==KMessageBox::Cancel ) return;
+        if ( ret==KMessageBox::Cancel ) {
+            m_widget->scanButton->setEnabled(true);
+            return;
+        }
         if ( ret==KMessageBox::Yes )
              save();
@@ -304,4 +308,5 @@ void KPluginOptions::scan()
                              i18n("The nspluginscan executable cannot be found. "
                                   "Netscape plugins will not be scanned.") );
+        m_widget->scanButton->setEnabled(true);
         return;
     }
@@ -326,8 +331,11 @@ void KPluginOptions::scan()
 
     // update dialog
+    if (m_progress) {
     m_progress->setProgress(100);
     load();
     delete m_progress;
     m_progress = 0;
+    }
+    m_widget->scanButton->setEnabled(true);
 }