Bug 234390 - The ASCII datasource no longer saves its config in .kst files
Summary: The ASCII datasource no longer saves its config in .kst files
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.0
Platform: unspecified Linux
: NOR normal
Target Milestone: 2.0.0
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-14 23:30 UTC by Nicolas Brisset
Modified: 2010-11-12 10:42 UTC (History)
1 user (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 Nicolas Brisset 2010-04-14 23:30:52 UTC
Version:           2.0.0_devel (using unspecified)
Compiler:          gcc (SUSE Linux) 4.4.1 
OS:                Linux

In recent kst 2 trunk versions (a few weeks/months back), the configuration of each datasource used in a plot was saved to the .kst file. This is no longer the case, so that very often when you reload a .kst session you see only empty plots (unless for some reason a specific file has appropriate settings stored from a previous usage).
The problem is best illustrated by the following .kst samples:

*** .kst sample from some time ago ***

<?xml version="1.0" encoding="UTF-8"?>
<kst version="2.0">
    <data>
        <source reader="ASCII file" file="5/5_NAV_SRC">
            <properties delimiters="#/c!;" columntype="0" headerstart="1" fields="0" readfields="true"/>
        </source>
    [snip]
    <data/>
    <variables>
        <datavector file="5/5_NAV_SRC" field="Time" start="0" count="-1" skip="-1" doAve="false" initialVNum="124" initialXNum="1355"/>
        <datavector file="5/5_NAV_SRC" field="5_NAV_SRC" start="0" count="-1" skip="-1" doAve="false" initialVNum="125" initialXNum="1366"/>
    [snip]
    <variables/>
...


*** .kst sample from yesterday's trunk ***
<?xml version="1.0" encoding="UTF-8"?>
<kst version="2.0">
    <data/>
    <variables>
        <datavector file="1/1_L173_VOR_LOC_DEV" field="Time" start="0" count="-1" skip="-1" doAve="false" initialVNum="1" initialXNum="1"/>
        <datavector file="1/1_L173_VOR_LOC_DEV" field="1_L173_VOR_LOC_DEV" start="0" count="-1" skip="-1" doAve="false" initialVNum="2" initialXNum="12"/>
...

=> The <data> section is completely omitted!!!
Comment 1 Peter Kümmel 2010-04-27 22:24:37 UTC
Does this bug still exists? I could not reproduce it.
The 12 graphs generated by the comma test data could be 
saved and loaded without problems.
Comment 2 Nicolas Brisset 2010-04-28 09:54:19 UTC
You have to pay attention: if the default settings for the ASCII datasource correspond to the configuration of those files, or if the files loaded have stored their individual settings in the past, you can read in the .kst without problems even though the config information is missing from the .kst. 
So the test you have to do is store a .kst, change the default settings to something else than the right settings for the file you have used, and reload the .kst. 

That said, I have just had a look in the .kst and the config now seems to be written to the file (the data section is not empty as in the snippets above). However, when I do the above test (i.e. removing the key for that specific file and changing ASCII defaults to something different than what it needs) then I can't reload the .kst. So it seems at this point the config is saved, but I'm not closing the bug as it seems to be improperly read back when loading the .kst.
Comment 3 Peter Kümmel 2010-04-28 11:10:22 UTC
OK, I've replaced the comma seperator with $, so I'm sure it is not default for reading ascii data. Then saving/loading to a .kst file works and the <data> section is not empty.
But what do you mean with "removing the key" seems this is needed to reproduce the bug.
Comment 4 Nicolas Brisset 2010-04-28 11:13:41 UTC
Sorry, that was not clear. I meant removing the settings from the place they are stored (HKEY_CURRENT_USER\Software\kst\data\... key in the Windows registry if you're under Windows, as I was when I did the test)
Comment 5 Peter Kümmel 2010-04-28 13:16:08 UTC
Yes, after deleting the registry entries I also could not load the file, kst even crashes?
But I also could not load the data when I've used the wizard before to fill the registry. Maybe there where some old values which makes it work before.
Comment 6 Nicolas Brisset 2010-04-29 11:04:54 UTC
I think this is OK now. See also bug #219849...
I'm closing it, we'll reopen if needed.
Comment 7 Peter Kümmel 2010-08-14 12:14:48 UTC
Change version from 2.0.0_devel to 2.0.0 to simplify version numbering.
Comment 8 Peter Kümmel 2010-11-12 10:42:29 UTC
These bugs are solved with 2.0.0