lutraconsulting / MDAL

Mesh Data Abstraction Library
http://www.mdal.xyz/
MIT License
160 stars 50 forks source link

MDAL crashes with MARS data (GRIB) #79

Closed PeterPetrik closed 5 years ago

PeterPetrik commented 5 years ago

https://apps.ecmwf.int/datasets/data/interim-full-daily/levtype=sfc/

crashes on

void MDAL::DriverGdal::addDataToOutput( GDALRasterBandH raster_band, std::shared_ptr<MemoryDataset> tos, bool is_vector, bool is_x )
{
  assert( raster_band );

where raster_band is null pointer;

PeterPetrik commented 5 years ago

@nirvn

nirvn commented 5 years ago

Thanks for looking into this @PeterPetrik .

saberraz commented 5 years ago

_mars-atls14-95e2cf679cd58ee9b4db4dd119a05a8d-JqgDKs.grib.zip Works fine with the attached data.

nirvn commented 5 years ago

This one crashes QGIS: https://www.dropbox.com/s/o9b8cuq22mybvj7/_mars-atls06-70e05f9f8ba4e9d19932f1c45a7be8d8-BlonFv.grib?dl=0

saberraz commented 5 years ago

auuuch....it didn't even give any error message...💥💥💥

nirvn commented 5 years ago

Yeah it's brutal ;)

PeterPetrik commented 5 years ago

@nirvn do you have the same (failing) testcase but smaller (smaller area or less timesteps). ideally < 1MB so I can add it to test suite.

I think I found the error . In dataset, there is variable wind which has metadata which suggests it is vector quantity. But it has just 1 part of the data...

nirvn commented 5 years ago

Nothing at-hand unfortunately. I'll try to fetch a smaller version that still crashes tomorrow.

saberraz commented 5 years ago

wind_u.grib.zip I have extracted the first 2 time steps from the problematic grib and saved it in this file...which still crashes QGIS.

cdo seltimestep,1/2 _mars-atls06-70e05f9f8ba4e9d19932f1c45a7be8d8-BlonFv.grib wind_u.grib

PedroVenancio commented 5 years ago

Hi @PeterPetrik ,

I've some NetCDF files that crash QGIS (both 3.4.4 and Master) when loading them as Mesh or thru Browser. This seems to just happen in Windows (OSGeo4w64bits).

Can you please take a look?

Any of NetCDF from this site have this behaviour:

http://mf2.ipma.pt/downloads/

Thank you very much!

Best regards, Pedro

saberraz commented 5 years ago

Hi @PedroVenancio I tested it in Windows and it is related to #72

You need to change QGIS Shortcut in Windows. Right-click on QGIS shortcut in your start menu and select Properties.

In the new windows, set the Start in folder to somewhere, where user has write access (e.g. Desktop). After that, I managed to open it:

ezgif com-video-to-gif

PedroVenancio commented 5 years ago

Hi @saberraz

I've done that change in the shortcut, but I get the same crash, both in QGIS 3.4.4 and Master:

QGIS version 3.4.4-Madeira QGIS code revision 0e635828d9 Compiled against Qt 5.11.2 Running against Qt 5.11.2 Compiled against GDAL/OGR 2.4.0 Running against GDAL/OGR 2.4.0 Compiled against GEOS 3.7.0-CAPI-1.11.0 Running against GEOS 3.7.0-CAPI-1.11.0 673b9939 PostgreSQL Client Version 9.2.4 SpatiaLite Version 4.3.0 QWT Version 6.1.3 QScintilla2 Version 2.10.8 Compiled against PROJ 520 Running against PROJ 5.2.0

QGIS version 3.5.0-Master QGIS code revision 57695bd036 Compiled against Qt 5.11.2 Running against Qt 5.11.2 Compiled against GDAL/OGR 2.4.0 Running against GDAL/OGR 2.4.0 Compiled against GEOS 3.7.0-CAPI-1.11.0 Running against GEOS 3.7.0-CAPI-1.11.0 673b9939 PostgreSQL Client Version 9.2.4 SpatiaLite Version 4.3.0 QWT Version 6.1.3 QScintilla2 Version 2.10.8 Compiled against PROJ 520 Running against PROJ 5.2.0

I updated them today with OSGeo4W.

I also have started QGIS as Admin, and directly in the Admin user account, and I get always the crash.

Do you have any other hint?

Thanks!

saberraz commented 5 years ago

please follow #90