Closed nicogodet closed 2 years ago
.res
file is not supported by MDAL but seems supported by GDAL, that's why you 've got layer for each time step.
@nicogodet , I can't open the zip file.
@vcloarec Just remove .zip
from filename. It's not an archive, just a github hack
no problem with 3.22 self built on kubuntu:
Drag & Drop from *outside QGIS
From browser, I confirm it's OK.
I can confirm the issue. It either crashes immediately or at some later stage during zooming/panning/editing.
Confirmed, but on my side I've got a freeze without crash. It seems that QGIS tries to open it with OGR provider before trying as mesh layer.
It seems that it is the OGR provider that can't handle with it.
The issue is at the level of the OGR provider, maybe because the Selafin files doesn't have dataset. I wonder if Selafin files allow only mesh frame without any dataset. If yes, this is an OGR issue, if not, it is a MDAL issue because MDAL has to write a least one dataset group in Selafin file. @nicogodet , can TELEMAC produce Selafin files without dataset ?
Vincent, I think the issue can be also reproduced with a 2dm file too.
@saber, no problem on my side with 2dm, but freeze when trying loading the file as vector layer.
@vcloarec TELEMAC can not produce SELAFIN/SERAFIN without dataset.
But TELEMAC is not used to create the mesh frame. It is only used to run computation. Meshers like BlueKenue, Basemesh or SalomeHydro (EDF) are used to create the SELAFIN and these mesher can produce SELAFIN without dataset.
BTW
.res
file is not supported by MDAL
It should as the extension of SELAFIN file is useless. .slf
, .ser
, .res
, .geo
are common extensions for SELAFIN/SERAFIN but sometimes no extension at all.
But I guess it becomes difficult to guess the file type if extensions may vary form user to user...
But I guess it becomes difficult to guess the file type if extensions may vary form user to user...
MDAL does not use the extension but try to read the file. If the file are the same inside (res/slf), MDAL could read *.res file..
and these mesher can produce SELAFIN without dataset.
So maybe it is an OGR issue... Debugging with this Selafin files, OGR provider detects more than 300 000 sublayers...
@nicogodet , can you share the *.res file?
Provide an email as I can send you an download link tomorrow. I can't share it publicly.
In the mean time, I think you can try with validation result file from TELEMAC validation test suite : https://gitlab.pam-retd.fr/otm/telemac-mascaret/-/tree/main/examples/telemac2d/malpasset
f2d_**.slf
are result file with the last time step only.
.slf
without dataset -> Crash/Hang.slf
with dataset -> OK the meshlayer is recognized in the new sublayer selector window
.res
with dataset -> No crash but meshlayer is not recognized
@nicogodet I confirm, for file with none dataset, it is an OGR issue that can't handle this case. When dropping the file in QGIS, some providers try to look in supported file to find sublayers. When debugging, I see that OGR provider finds in this file more than 300 000 sublayers... so that create this freeze when handling with all this sub layers or, I think, the crash on your side.
For *.res
file, indeed, you are right, even if MDAL can read it, QGIS filters the file with their extension comparing with extension provided by MDAL. So, if '*.res' or other extension has to be read by MDAL, it is an MDAL issue, you can feel a ticket in the MDAL repo.
@vcloarec That's strange that OGR find a lot of sublayers...
For *.res
, I think it could be part of a larger improvement regarding SELAFIN reading by MDAL with https://github.com/lutraconsulting/MDAL/issues/286
Making MDAL less strict when reading SELAFINs
upstream bug in OGR fixed by https://github.com/OSGeo/gdal/pull/4945
What is the bug or the crash?
Tried on Windows and Linux and on both platform, QGIS hangs after drag & drop a SELAFIN meshlayer. It hangs with 100% CPU usage.
test_mesh_3.22.slf.zip
~~In general, Drag & Drop of meshlayer seems not well handle by QGIS. Dropping a TELEMAC
.res
open faces as polygon layer for each time step and vertices as point layer for each time step. Should I create another issue or do we make this current ticket more general ? (The layer in screenshot can be sent by email if requested)~~ See first commentSteps to reproduce the issue
Drag and drop a meshlayer in QGIS
Versions
3.22 Linux and Windows
Supported QGIS version
New profile
Additional context
No response