Version: (using KDE KDE 3.5.5) Installed from: SuSE RPMs OS: Linux When I use the NetCDF data source with GOTEX.C130_N130AR.LRT.RF06.PNI.nc, trying to plot base_time vs INDEX crashes Kst. I think the problem is because the NetCDF file only contains one value for base_time and it's not in the range of frames for the other values.
Strange, it does not crash here (kst 1.3.1 on Solaris 8/KDE 3.4.0). I get a 1-value vector for base_time (value = 1077114120) and INDEX is a vector of length 3061 with values from 0 to 3060. Have you tracked the cause of the crash further ? I'm always uncertain how things work with frames and frame counts for datasources where vectors have different lengths. The behavior of frameCount(const QString& field) when field is empty is kind of undefined, and I chose to return the max value. No idea what that might break, though...
It crashes on var->get_rec(i+s) at line 192. i+s is 0. When I do ncdump -v base_time -f c GOTEX.C130_N130AR.LRT.RF06.PNI.nc, it shows base_time = 1077114120; // base_time(1209150752) as the only value. Note the index (1209150752) is much bigger than 3061 (the maximum index of the other variables). Perhaps fetching base_time as a record is invalid?
Interesting. I get: base_time = 1077114120; // base_time(0) on Solaris with the ncdump command. My netcdf version is: netcdf library version 3.6.0 of Mar 16 2005 16:53:46 $ On Linux I get: base_time = 1077114120; // base_time(134717925) with the same command, same version (3.6.0) It looks like an endianness issue to me, and interestingly netcdf 3.6.1 (latest stable version) gives on Linux: base_time = 1077114120; // base_time(0) So I'd say it's a netcdf endianness bug in some versions, that seems fixed in 3.6.1. What version are you using ? If upgrading to 3.6.1 solves the problem, we can close this bug :-)
Hmm... I updated to 3.6.1 and it still crashes in the same place. ncdump now shows the right thing, however.
Pardon me for asking such a stupid question, but are you sure your kst datasource plugin is using the newer version ? I guess you've recompiled/relinked it and made sure it points to the right version, but I think loaded plugins/datasources are not updated as long as kst is not closed and started anew. I even wanted to create a bug report for that, as it is quite confusing. I'm not familiar with the way libraries are loaded dynamically in kst, but maybe you did not really have the newer version running ? Otherwise I don't really understand why it wouldn't work. I'll have to try it on a PC, since under Solaris it works without problems.
Please re-open the bug once it is confirmed that the problem can be recreated with the latest version of the NetCDF data source.