qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

QGIS crash when large netCDF mesh file is added to project #56786

Closed Evanilton closed 7 months ago

Evanilton commented 7 months ago

What is the bug or the crash?

QGIS crashes when attempting to add a mesh file (NetCDF; .nc) file.

Steps to reproduce the issue

  1. Add mesh file (.nc)
  2. Not responding state
  3. QGIS crashed

Versions

QGIS Version: 3.34.3-Prizren QGIS code revision: 47373234ac Compiled against Qt: 5.15.3 Running against Qt: 5.15.3 Compiled against GDAL: 3.8.3 Running against GDAL: 3.8.3

Supported QGIS version

New profile

Additional context

User Feedback

I was trying to add a mesh (NetCDF; .nc) file to my project and it always crashes.

Report Details

Python Stack Trace

Windows fatal exception: access violation

Thread 0x000055f0 (most recent call first):
  File "C:\OSGEO4~1\apps\Python39\lib\multiprocessing\connection.py", line 305 in _recv_bytes
    waitres = _winapi.WaitForMultipleObjects(
  File "C:\OSGEO4~1\apps\Python39\lib\multiprocessing\connection.py", line 250 in recv
    buf = self._recv_bytes()
  File "C:\OSGEO4~1\apps\Python39\lib\multiprocessing\pool.py", line 576 in _handle_results
    task = get()
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 917 in run
    self._target(*self._args, **self._kwargs)
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 980 in _bootstrap_inner
    self.run()
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 937 in _bootstrap
    self._bootstrap_inner()

Thread 0x0000009c (most recent call first):
  File "C:\OSGEO4~1\apps\Python39\lib\multiprocessing\pool.py", line 528 in _handle_tasks
    for taskseq, set_length in iter(taskqueue.get, None):
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 917 in run
    self._target(*self._args, **self._kwargs)
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 980 in _bootstrap_inner
    self.run()
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 937 in _bootstrap
    self._bootstrap_inner()

Thread 0x00002318 (most recent call first):
  File "C:\OSGEO4~1\apps\Python39\lib\multiprocessing\connection.py", line 811 in _exhaustive_wait
    res = _winapi.WaitForMultipleObjects(L, False, timeout)
  File "C:\OSGEO4~1\apps\Python39\lib\multiprocessing\connection.py", line 879 in wait
    ready_handles = _exhaustive_wait(waithandle_to_obj.keys(), timeout)
  File "C:\OSGEO4~1\apps\Python39\lib\multiprocessing\pool.py", line 499 in _wait_for_updates
    wait(sentinels, timeout=timeout)
  File "C:\OSGEO4~1\apps\Python39\lib\multiprocessing\pool.py", line 519 in _handle_workers
    cls._wait_for_updates(current_sentinels, change_notifier)
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 917 in run
    self._target(*self._args, **self._kwargs)
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 980 in _bootstrap_inner
    self.run()
  File "C:\OSGEO4~1\apps\Python39\lib\threading.py", line 937 in _bootstrap
    self._bootstrap_inner()

Current thread 0x000007e8 (most recent call first):
<no Python frame>

Stack Trace


providerGuiMetadataFactory :
providerGuiMetadataFactory :
providerGuiMetadataFactory :
providerGuiMetadataFactory :
providerGuiMetadataFactory :
QgsMeshLayer::setDataProvider :
QgsMeshLayer::QgsMeshLayer :
QgsMapLayerFactory::createLayer :
QgsProviderSublayerDetails::toLayer :
QgsAppLayerHandling::addSublayers :
QgsMapToolRotateLabel::setRotationPreviewBox :
QgsAppLayerHandling::addMeshLayer :
QObject::qt_static_metacall :
QgsDataSourceManagerDialog::addLayer :
QObject::qt_static_metacall :
QgsAbstractDataSourceWidget::addMeshLayer :
providerGuiMetadataFactory :
QObject::qt_static_metacall :
QAbstractButton::clicked :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info QGIS Version: 3.34.3-Prizren QGIS code revision: 47373234ac Compiled against Qt: 5.15.3 Running against Qt: 5.15.3 Compiled against GDAL: 3.8.3 Running against GDAL: 3.8.3

System Info CPU Type: x86_64 Kernel Type: winnt Kernel Version: 10.0.19045

agiudiceandrea commented 7 months ago

@Evanilton, please provide a sample layer with which the crash occurs.

Evanilton commented 7 months ago

c_gls_BA300-NRT_202309030000_GLOBE_S3_V3.1.1.nc https://drive.google.com/file/d/1wmy_9O8iKJtZhCgMkKVokyzJiJwWb9vG/view?usp=drive_web Hello Andrea

I tried to attach the file when reporting, but it was not supported.

Here it is.

Regards

Andrea Giudiceandrea @.***> escreveu (domingo, 10/03/2024 à(s) 22:02):

@Evanilton https://github.com/Evanilton, please provide a sample layer with which the crash occurs.

— Reply to this email directly, view it on GitHub https://github.com/qgis/QGIS/issues/56786#issuecomment-1987361351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKEOIDNYUL5MRV3IDQWBRDYXTC7ZAVCNFSM6AAAAABEPGOGJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGM3DCMZVGE . You are receiving this because you were mentioned.Message ID: @.***>

-- Evanilton Pires Coordenador do curso de Engenharia do Ambiente, ISPTundavala Professor assistente no ISPTundavala Mestre em Gestão Ambiental pela Escola Superior Agrária de Coimbra (ESAC) Licenciado em Engenharia do Ambiente pelo ISPTundavala +244937111758 +351913338041 @. / @. @.> / @. / @.*** www.isptundavala.ao / www.esac.pt Evanilton E S Pires ORCID iD https://orcid.org/0000-0002-9686-1918 LinkedIn https://www.linkedin.com/in/evanilton-e-s-pires-7520446a/

rouault commented 7 months ago

This is exactly the same issue as https://github.com/qgis/QGIS/issues/55811. This is a huge netCDF file 120960 x 47040, and this blows up RAM usage in MDAL's GDAL importer. Closing as duplicate

Evanilton commented 7 months ago

Thank you so much for the support, Even.

Cheers

Even Rouault @.***> escreveu (segunda, 11/03/2024 à(s) 02:19):

This is exactly the same issue as #55811 https://github.com/qgis/QGIS/issues/55811. This is a huge netCDF file 120960 x 47040, and this blows up RAM usage in MDAL's GDAL importer. Closing as duplicate

— Reply to this email directly, view it on GitHub https://github.com/qgis/QGIS/issues/56786#issuecomment-1987465109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKEOIAZ7V5DPFLLXUPSBI3YXUBBRAVCNFSM6AAAAABEPGOGJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGQ3DKMJQHE . You are receiving this because you were mentioned.Message ID: @.***>

-- Evanilton Pires Coordenador do curso de Engenharia do Ambiente, ISPTundavala Professor assistente no ISPTundavala Mestre em Gestão Ambiental pela Escola Superior Agrária de Coimbra (ESAC) Licenciado em Engenharia do Ambiente pelo ISPTundavala +244937111758 +351913338041 @. / @. @.> / @. / @.*** www.isptundavala.ao / www.esac.pt Evanilton E S Pires ORCID iD https://orcid.org/0000-0002-9686-1918 LinkedIn https://www.linkedin.com/in/evanilton-e-s-pires-7520446a/