Bug report #21162
Closing a netcdf raster in Windows causes core dump
|Affected QGIS version:||3.5(master)||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||28980|
1- Download http://mf2.ipma.pt/downloads/?latest=arome.2m.relative_humidity®ion=PT2
2- Add the netcdf as raster
3- Right-click and remove the raster in layers panel
This is a Windows only issue and might be related to netcdf driver.
#4 Updated by Pedro Venâncio almost 4 years ago
Downgrading netcdf driver to 4.3.0-1, also available in OSGeo4W, is not an option here, because this NetCDF files are not correctly recognized as Raster (min and max value always 1.79769e+308) with this version.
Loading them as Mesh gives
Invalid Data Source: D:\AROME_OPER_001_FC_SP_PT2_025_RH_2-HTGL_2019020412.nc is not a valid or recognized data source.
#7 Updated by Alexandre Neto almost 4 years ago
This is the crash report I get:
Crash ID: be28959efc88f41008b90f2715e269b9959ca36c
QGIS Version: 3.5.0-Master
QGIS code revision: 4a44306700
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.0
Running against GDAL: 2.4.0
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17763
#12 Updated by Pedro Venâncio almost 4 years ago
Jürgen Fischer wrote:
Saber Razmjooei wrote:
Thanks jef for the update.
Now, I can open the netcdf in QGIS 3.4 but in master it fails to open altogether. @pedro @alexandre could you confirm?
works fine in the nightly (64bit) of 185855b214 for me.
I'm also with problems in master (code revision 185855b214).
Now I don't have any crash in browser when opening the folder with these NetCDF files, but when I try to load them in QGIS, I get:
- Loading as Mesh:
2019-02-06T09:26:19 CRITICAL Layer is not valid : The layer is not a valid layer and can not be added to the map 2019-02-06T09:29:53 CRITICAL Invalid Data Source : C:\Users\pedro.venancio\Documents\Nova_pasta_2\AROME_OPER_001_FC_SP_PT2_025_RH_2-HTGL_2019020512.nc is not a valid or recognized data source.
- Loading as Raster:
2019-02-06T09:27:06 CRITICAL Invalid Layer : GDAL provider Cannot open GDAL dataset C:/Users/pedro.venancio/Documents/Nova_pasta_2/AROME_OPER_001_FC_SP_PT2_025_RH_2-HTGL_2019020512.nc: `C:/Users/pedro.venancio/Documents/Nova_pasta_2/AROME_OPER_001_FC_SP_PT2_025_RH_2-HTGL_2019020512.nc' not recognized as a supported file format. (file: ..\..\..\src\providers\gdal\qgsgdalprovider.cpp row: 2616function QgsGdalProvider::initIfNeeded:) Raster layer Provider is not valid (provider: gdal, URI: C:/Users/pedro.venancio/Documents/Nova_pasta_2/AROME_OPER_001_FC_SP_PT2_025_RH_2-HTGL_2019020512.nc (file: ..\..\..\src\core\raster\qgsrasterlayer.cpp row: 616function QgsRasterLayer::setDataProvider:)
With QGIS 3.4.4 everything works fine.
#14 Updated by Pedro Venâncio almost 4 years ago
I re-installed qgis-dev, gdal and netcdf, but I get the same behaviour in master.
This is even more strange.
In Browser, if I load the .nc file, first as Raster, and then as Mesh, everything works fine.
If I try to load the Mesh first, I get that error.
Please see the screencast attached.
The same happens loading .nc files from Data Source Manager (First as Raster, then as Mesh -> ok | First as Mesh -> Invalid Data Source: C:\Users\pedro.venancio\Documents\netcdf\AROME_OPER_001_FC_SP_PT2_025_TMP_2-HTGL_2019020600.nc is not a valid or recognized data source.).
The context menu is also different in both versions.
#16 Updated by Jürgen Fischer almost 4 years ago
Saber Razmjooei wrote:
I can confirm the issue. I think it is a browser problem with handling the file formats. Everything works as expected from Add Source Layer option.
Let me try it in the latest Linux build and we can open a new ticket.
Wait for the next nightly build - the current might still be built with the previous HDF5 (so the MDAL provider might still have issues, that GDAL doesn't have anymore).