Summary: | Can't use new dirfile data source | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Netterfield <netterfield> |
Component: | general | Assignee: | George Staikos <staikos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Netterfield
2004-08-10 15:57:18 UTC
Can't reproduce this in the data wizard. Seems to work in the vector dialog for me too. I see it on two machines, both with clean installs. (make clean, make dist-clean, make -f Makefile.cvs, configure, make uninstall, make, make install) run kst; open the default dir file with the wizard. All is well. try to open a different dirfile with the wizard - doesn't work. Does anyone else see this? On August 11, 2004 11:10 am, George Staikos wrote: > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=86918 > staikos kde org changed: > > What |Removed |Added > --------------------------------------------------------------------------- >- Status|NEW |UNCONFIRMED > > > > ------- Additional Comments From staikos kde org 2004-08-11 17:10 ------- > Seems to work in the vector dialog for me too. On Wednesday 11 August 2004 12:49, netterfield@astro.utoronto.ca wrote: > 18:49 ------- I see it on two machines, both with clean installs. > (make clean, make dist-clean, make -f Makefile.cvs, configure, make > uninstall, make, make install) > > run kst; open the default dir file with the wizard. All is well. > try to open a different dirfile with the wizard - doesn't work. > > Does anyone else see this? Ok I figured out how to reproduce it. It's not a problem if the dirfile has the same contents, for some reason. Appears to be a bit of a design flaw in getdata.c. It gets confused on subsequent sessions. Attempting to fix now... CVS commit by staikos: the field is not cacheable here. a second instance of the dirfile reader has completely different fields... CCMAIL: 86918-done@bugs.kde.org M +2 -3 dirfile.cpp 1.11 M +10 -13 getdata.c 1.15 --- kdeextragear-2/kst/kst/datasources/dirfile/dirfile.cpp #1.10:1.11 @@ -126,5 +126,5 @@ void DirFileSource::save(QTextStream &ts } -#include <kdebug.h> +//#include <kdebug.h> extern "C" { @@ -135,5 +135,4 @@ KstDataSource *create_dirfile(const QStr QStringList provides_dirfile() { QStringList rc; - // create the stringlist rc += "Directory of Binary Files"; return rc; @@ -149,5 +148,5 @@ int understands_dirfile(const QString& f } - //kdDebug() << "Don't understand. FrameCount=" << frameCount << " err=" << err << endl; + //kdDebug() << "Don't understand. filename = [" << filename << "] FrameCount=" << frameCount << " err=" << err << endl; return 0; } --- kdeextragear-2/kst/kst/datasources/dirfile/getdata.c #1.14:1.15 @@ -1364,7 +1364,6 @@ int GetNFrames(const char *filename_in, struct stat statbuf; int nf; + char field_buf[80]; const char *field; - static char default_field[80]; - static int default_set = 0; int i; @@ -1390,16 +1389,13 @@ int GetNFrames(const char *filename_in, if (in_field == NULL) { - if (!default_set) { /* check for first valid raw field */ for (i=0; i<F->n_raw; i++) { sprintf(raw_data_filename,"%s/%s", filename, F->rawEntries[i].field); if (stat(raw_data_filename, &statbuf) >=0) { - strncpy(default_field, F->rawEntries[i].field, 79); + strncpy(field_buf, F->rawEntries[i].field, 79); i = F->n_raw; } } - default_set = 1; - } - field = default_field; + field = field_buf; } else { field = in_field; @@ -1451,2 +1447,3 @@ int GetSamplesPerFrame(const char *filen return (GetSPF(field_name, F, error_code)); } +/* vim: ts=2 sw=2 et */ |