Bug 87013 - hang when editing a plugin
Summary: hang when editing a plugin
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: George Staikos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-12 05:10 UTC by Netterfield
Modified: 2004-08-12 22:50 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 Netterfield 2004-08-12 05:10:40 UTC
Version:           0.99-devel (using KDE 3.2 BRANCH >= 20040204, Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
OS:                Linux (i686) release 2.6.2-3mdk

If you try to edit parameters for a plugin, kst hangs on <OK>

How to reproduce:
start kst.  Load a curve
From the plot: rmb->filter->[curvename]
in the filter dialog, select a filter and set the parameters (eg, Butterworth low-pass, 4 poles, 0.1 cutoff). then <OK>.
The new filtered curve is plotted.
Then, from the data manager, edit the plugin.
Change the frequency from 0.1 to 0.05.  Click <OK>.  The curve is redrawn with the new parameter, and kst hange with ~0 CPU usage.

Correct Behavior: kst doesn't hang.
Comment 1 George Staikos 2004-08-12 21:38:46 UTC
Appears to be a problem in CVS still.  Investigating.
Comment 2 George Staikos 2004-08-12 22:04:44 UTC
Are these filters exceedingly slow for everyone, or just me?  They seem to take minutes to compute on a relatively small number of samples.
Comment 3 George Staikos 2004-08-12 22:14:42 UTC
Definitely deadlock.
Comment 4 George Staikos 2004-08-12 22:50:20 UTC
CVS commit by staikos: 

correct locking for the edit case
CCMAIL: 87013-done@bugs.kde.org


  M +1 -4      kstplugindialog_i.cpp   1.82


--- kdeextragear-2/kst/kst/kstplugindialog_i.cpp  #1.81:1.82
@@ -456,18 +456,16 @@ bool KstPluginDialogI::edit_I() {
   DP->inputScalars().clear();
 
-  DP->writeUnlock();
   // Save the vectors and scalars
   if (!saveInputs(DP, pPtr)) {
     KMessageBox::sorry(this, i18n("There is an error in the plugin you "
                                   "entered. Please fix it."));
+    DP->writeUnlock();
     return false;
   }
 
-  DP->writeLock();
   if (pitem >= 0 && PluginCombo->count() > 0) {
     DP->setPlugin(pPtr);
   }
 
-  DP->writeUnlock();
   if (!saveOutputs(DP, pPtr)) {
     KMessageBox::sorry(this, i18n("There is an error in the plugin you "
@@ -476,5 +474,4 @@ bool KstPluginDialogI::edit_I() {
   }
 
-  DP->writeLock();
   if (!DP->isValid()) {
     KMessageBox::sorry(this, i18n("There is an error in the plugin you entered. Please fix it."));