Bug 135548 - Crash when attempting to use Fit Polynomial plugin.
Summary: Crash when attempting to use Fit Polynomial plugin.
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-13 00:41 UTC by Duncan Hanson
Modified: 2007-02-12 22:23 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 Duncan Hanson 2006-10-13 00:41:26 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
OS:                Linux

Attempting to fit the simpledata.dat file of the Kst tutorial with a second order polynomial crashes Kst.

Paste the following into a data file

-20 100
-19 90.25
-18 81
-17 72.25
-16 64
-15 56.25
-14 49
-13 42.25
-12 36
-11 30.25
-10 25
-9 20.25
-8 16
-7 12.25
-6 9
-5 6.25
-4 4
-3 2.25
-2 1
-1 0.25
0 0
1 0.25
2 1
3 2.25
4 4
5 6.25
6 9
7 12.25
8 16
9 20.25
10 25
11 30.25
12 36
13 42.25
14 49
15 56.25
16 64
17 72.25
18 81
19 90.25
20 100

... and plot it with the first column as x and the second as y. Then attempt a 2nd order polynomial fit. Kst crashes for me (and I've just make a fresh build from trunk).

No backtrace, but here's what Kst spits out before it SIGABRTs

creating KstVector Anonymous Vector 5
creating KstVector Anonymous Vector 6
kst: Update timer 200
kst: Forced update!
kst: FATAL: Thread -1212535904 tried to unlock KstRWLock 0x8f05c24 (unlocked) without holding the lock
KCrash: Application 'kst' crashing...
QSocketNotifier: invalid socket 9 and type 'Read', disabling...
QSocketNotifier: invalid socket 4 and type 'Read', disabling...
QSocketNotifier: invalid socket 7 and type 'Read', disabling...
Comment 1 Netterfield 2006-10-13 00:47:15 UTC
Trunk seems to work for me (?)
cbn

On Thursday 12 October 2006 18:41, Duncan Hanson wrote:
[bugs.kde.org quoted mail]
Comment 2 Adam Treat 2006-10-13 01:14:30 UTC
I can't reproduce with trunk either.
Comment 3 Nicolas Brisset 2006-10-13 09:54:39 UTC
I don't seem to have the problem in 1.3 (branch) either...
Comment 4 Adam Treat 2006-10-16 18:09:00 UTC
Can't reproduce.
Comment 5 Duncan Hanson 2006-10-17 23:36:59 UTC
Do you do the fit using the Data->New Menu, or using the Fit context menu item 
in the plot? The crash only occurs for me using the Data->New Plugin route. 

Duncan.

On Monday 16 October 2006 09:09, Adam Treat wrote:
[bugs.kde.org quoted mail]
Comment 6 Adam Treat 2006-10-18 00:42:13 UTC
I see it.  Thanks Duncan.
Comment 7 Adam Treat 2006-10-18 01:31:50 UTC
This deadlock appears for all fit plugins created through the top-level menu OR the datamanager->new plugin manner.

It seems to be caused by commit #576228.  The commit log says 576228 was a fix for another deadlock.  Removing this change fixes this bug, but I don't know what the other deadlock was about, so I'm loathe to revert.
Comment 8 George Staikos 2006-10-18 05:38:57 UTC
This won't be fixed in 1.3.1 and I'm hesitant to fix it in 1.3.x at all.  This 
deadlock is the result of a fix for another deadlock.  The reason for this 
mess is somewhat complicated.  First, automatically adding scalars to the 
global list is an issue when we need to lock an object that we are providing 
while we are locked.  It can deadlock with the update thread.  The "fix" for 
this caused the regression referenced in this bug.  The function it happened 
in doesn't even belong in KstPlugin.  KstScalar's constructor is a mess 
already, especially with the locking argument, and adding another is not a 
good answer.  I think we need to fix scalars properly.  This is a Kst 1.4 
item only.
Comment 9 Netterfield 2006-10-18 05:48:49 UTC
Why does it work from the 2dplot rmb, but not from the dialog?


On Tuesday 17 October 2006 23:38, George Staikos wrote:
[bugs.kde.org quoted mail]
Comment 10 George Staikos 2006-10-18 06:12:14 UTC
Different locking/nesting situation.
Comment 11 Adam Treat 2006-12-14 17:54:43 UTC
Note: This is fixed in the hierarchy branch with commit #612802
Comment 12 Andrew Walker 2007-02-12 21:23:20 UTC
Duncan, could you test this and confirm that the problem has been fixed. If so please mark this bug report as fixed.
Comment 13 Duncan Hanson 2007-02-12 22:23:45 UTC
*** Bug has been marked as fixed ***.