Bug 249803 - kst tries to load netCDF files with the ASCII datasource
Summary: kst tries to load netCDF files with the ASCII datasource
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: datasources (show other bugs)
Version: 2.0.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 2.0.1
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-01 23:35 UTC by Nicolas Brisset
Modified: 2010-11-12 10:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2010-09-01 23:35:40 UTC
Version:           2.0.1
OS:                Linux

- Compile netcdf support into kst2
- Download a netcdf sample file (e.g. http://www.unidata.ucar.edu/software/netcdf/examples/GOTEX.C130_N130AR.LRT.RF06.PNI.nc)
- Try to open it with the data wizard: it insists on loading it with ASCII - no luck

Reproducible: Always

Steps to Reproduce:
See above

Actual Results:  
The selected datasource plugin is ASCII

Expected Results:  
The datasource plugin should be netCDF

OS: Linux
In the Debug dialog the netcdf datasource appears in the list of loaded plugins.

It must be a recent regression or a problem specific to my setup here, because not so long ago it worked.
Comment 1 Nicolas Brisset 2010-09-01 23:37:12 UTC
I forgot to mention that kst2 is compiled from sources with the build-kst script and executed from the build dir with run-kst, in case it matters (I don't see why it should...)
Comment 2 Peter Kümmel 2010-09-02 07:48:56 UTC
No problems under Windows with the released 2.0.1-beta1 binaries.
Comment 3 Peter Kümmel 2010-09-02 08:50:09 UTC
Also no problems with a fresh build under Linux, but I've used QtCreator (could be installed as non-root).
Comment 4 Nicolas Brisset 2010-09-02 16:16:43 UTC
Hum. I have just tried it on my Linux PC at work (built with the script), and it works. Probably something broke during compilation at home. I'll close this as soon as I get a chance to try a complete fresh build at home. I think I did a first compilation run before installing netcdf and gsl devel packages and relaunched the script after installing them. It did not recompile everything, maybe something slipped through.
Comment 5 Nicolas Brisset 2010-09-02 22:06:14 UTC
I can confirm that even a completely clean build does not help here. The config is: openSuse 11.3, kst2 compiled from latest snapshot, netcdf-devel package installed and following message from qmake:

Project MESSAGE: Found netcdf at -lnetcdf
Project MESSAGE: Using netcdf headers in /usr/include

The funny thing is that the .so file gets built and seems to be loaded (judging from the list in the debug dialog). 

Does anybody have an idea what could have gone wrong?
Comment 6 Nicolas Brisset 2010-10-03 01:03:44 UTC
I've found the explanation! This is due to the fact that my path contains special characters ("Téléchargements"), and the filename is transformed into something that NcFile does not understand:

    QByteArray bytes = filename.toLatin1();
    NcFile *ncfile = new NcFile(bytes.constData());

I can work around it (by using a different path) but I don't know how to fix it properly. Yet.
Comment 7 Nicolas Brisset 2010-10-03 01:13:28 UTC
SVN commit 1181993 by brisset:

Utf8 seems to be the way to go... At least it works here with French
locale.

BUG: 249803


 M  +2 -3      kstnetcdf.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1181993
Comment 8 Peter Kümmel 2010-11-12 10:37:07 UTC
There is no version list for "Version Fixed in".
Use Target Milestone as indicator when the bug was fixed.