-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening NetCDF makes computer crash #55811
Comments
@EmileSonneveld, thanks for reporting. QGIS 3.22 is no longer supported. May you please actually try if the issue occurs also using a currently supported QGIS version (QGIS 3.34.2, QGIS 3.28.14) and provide the full version info ("In the QGIS Help menu -> About, click in the table, Ctrl+A and then Ctrl+C. Finally paste here. Do not make a screenshot.") as requested in the issue report form? |
The huge RAM consumption arises when opening the file with "Add mesh layer" . It works fine with "Add raster layer" (using GDAL netCDF driver) |
@PeterPetrik Debugging this, I see QGIS spends its time in MDAL::DriverGdal::initFaces(). On this dataset where width = 16831 and height = 12992, and my understanding of "typedef std::vector Faces;" and "typedef std::vector<size_t> Face;", my estimate of the minimum amount of RAM required is 16830 * 12991 * (sizeof(size_t) + sizeof(void*) + 4 * sizeof(size_t)) ~= 10 GB, and probably more due to memory fragmentation given we allocate lots of Face elements one at a time. |
Loading it without the mesh indeed avoids the problem! Can I disable mesh creation by default in QGIS? Or configure the NetCDF to avoid mesh creation? |
Hi and thanks for report and debugging: created MDAL issue for this lutraconsulting/MDAL#476 |
In |
Opening this file in 3.34.3 memory consumption rises till 36 GB in steps and then it starts rising in a linear way as if there is a memory leak. When QGis reaches 50 GB of memory consumption i get a "Bad allocation" error, but the program stays alive. Removing this layer then takes a long time where you can see memory consumption drop to some normal 350 MB. |
Another instance of that issue in #56786 (comment) |
What is the bug or the crash?
When I open this file with QGIS, my whole user session crashes. I get a black screen and need to log in again.
I think it is due to an over de top amount of RAM being allocated:
https://emilesonneveld.be/misc/Sentinel2_makes_linux_user_session_crash.nc (Save any work before opening this NetCDF)
Steps to reproduce the issue
Versions
3.22.4-Białowieża
Supported QGIS version
New profile
Additional context
I made a new profile and added the standard
OpenStreetMap
as background. Still got the crashI run Ubuntu with kernel
6.2.0-39-generic
My colleague runs Linux mint and has the same problem
The text was updated successfully, but these errors were encountered: