Bug 241394 - crash when trying to configure stdin datasource
Summary: crash when trying to configure stdin datasource
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.7.0
Platform: Debian unstable Linux
: NOR crash
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-11 10:50 UTC by Timo Lindfors
Modified: 2010-06-14 20:57 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 Timo Lindfors 2010-06-11 10:50:58 UTC
Version:           1.7.0 (using KDE 4.4.3) 
OS:                Linux

Steps to reproduce:
1) while true; do echo $RANDOM; sleep 1; done | kst -y 1 stdin
2) Data->Data Manager
3) 1 Data Vector->Edit
4) Configure

Expected results:
4) kst does not crash

Actual results:
4) kst crashes:

kst: ascii.cpp:923: virtual void ConfigWidgetAscii::load(): Assertion `src' failed.
KCrash: Application 'kst' crashing...
KCrash cannot reach kdeinit, launching directly.


Reproducible: Always
Comment 1 Andrew Walker 2010-06-11 21:12:52 UTC
SVN commit 1137142 by arwalker:

BUG:241394 cleanup several underlying problems with the stdin data source

 M  +17 -3     datasources/ascii/ascii.cpp  
 M  +8 -3      kst/main.cpp  
 M  +6 -1      libkst/kstdatasource.cpp  
 M  +1 -0      libkst/kstdatasource.h  
 M  +5 -0      libkst/stdinsource.cpp  
 M  +1 -0      libkst/stdinsource.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1137142
Comment 2 Nicolas Brisset 2010-06-14 08:32:27 UTC
Does this need to be applied to kst 2.x as well?
Comment 3 Timo Lindfors 2010-06-14 10:25:36 UTC
Please reopen. Now even step 1 fails:

$ while true; do echo $RANDOM; sleep 1; done | src/kst/kst -y 1 stdin
kst: ERROR: No data in file stdin.  Trying to continue...

and using a temporary file does not help:

$ while true; do echo $RANDOM; sleep 1; done > a
$ head a
31215
25986
25817
$ src/kst/kst -y 1 stdin < a
kst: ERROR: No data in file stdin.  Trying to continue...
Comment 4 Andrew Walker 2010-06-14 20:13:19 UTC
This was by design. When kst first tries to read the temp file it will be 
empty and so an error was reported.

I've removed the error reported on stdout, and changed the error message in 
the debug log to a warning message.

Beyond that the data is displayed as expected.

Andrew

----- Original Message ----- 
From: "Timo Lindfors" <timo.lindfors@iki.fi>
To: <kst@kde.org>
Sent: Monday, June 14, 2010 1:25 AM
Subject: [Kst] [Bug 241394] crash when trying to configure stdin datasource


> https://bugs.kde.org/show_bug.cgi?id=241394
>
>
>
>
>
> --- Comment #3 from Timo Lindfors <timo lindfors iki fi>  2010-06-14 
> 10:25:36 ---
> Please reopen. Now even step 1 fails:
>
> $ while true; do echo $RANDOM; sleep 1; done | src/kst/kst -y 1 stdin
> kst: ERROR: No data in file stdin.  Trying to continue...
>
> and using a temporary file does not help:
>
> $ while true; do echo $RANDOM; sleep 1; done > a
> $ head a
> 31215
> 25986
> 25817
> $ src/kst/kst -y 1 stdin < a
> kst: ERROR: No data in file stdin.  Trying to continue...
>
> -- 
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
> _______________________________________________
> Kst mailing list
> Kst@kde.org
> https://mail.kde.org/mailman/listinfo/kst
>
Comment 5 Timo Lindfors 2010-06-14 20:57:38 UTC
Hmm? But "head a" printed lines so surely the input file "a" was not empty?