OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
823 stars 301 forks source link

[Bug] r.univar in Grass84 (Windows) with qgis 3.38.2 #4284

Open Rivages opened 1 week ago

Rivages commented 1 week ago

Describe the bug

Bug using r.univar in grass84 (not in grass83)

To reproduce

r.univar --quiet --overwrite map=MNTmask1a output=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761/univar.txt"

Screenshots

ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en
charge dans Windows
ATTENTION: Read error: We're not at the start of a row
ATTENTION: Erreur -72 de compression ZSTD : Src size is incorrect
ATTENTION: Erreur -72 de compression ZSTD : Src size is incorrect
ATTENTION: Erreur -72 de compression ZSTD : Src size is incorrect
ATTENTION: Read error: We're not at the start of a row
ATTENTION: Erreur -72 de compression ZSTD : Src size is incorrect
ERREUR : Erreur lors de la d�compression des donn�es raster fp pour la
ligne 8 de : code d'erreur -1
ATTENTION: Erreur de d�compression LZ4
Appuyez sur une touche pour continuer..

System description

Additional context

Discussion in https://github.com/OSGeo/grass/discussions/4283

Thanks

7SevenYU commented 1 week ago

I have encountered the same problem, do you have a solution?

Rivages commented 1 week ago

No, I use grass83!

petrasovaa commented 1 week ago

I can't reproduce this in GRASS directly, but I found it crashes with mask on and nprocs > 1. That was supposed to be fixed, but there is a bug. Any chance this is being run with mask and in parallel?

petrasovaa commented 1 week ago

The bug I described above is fixed in #4297.

petrasovaa commented 1 week ago

Well, I am not sure this is completed... The bug I fixed may be unrelated to this problem.

Rivages commented 1 week ago

I can reproduce it directy in GRASS84 with only 1 nproc (windows).

petrasovaa commented 1 week ago

I can reproduce it directy in GRASS84 with only 1 nproc (windows).

With mask on or off? What data?

Rivages commented 6 days ago

Here is my automatic process:

ETAPE 1 - Traitement de: C00_026384km_X889200Y6237761 Reading layer TA_MNTC2D_MAMP2024' from data sourceC:\Cartino2D\France_MNT\MAMP_2024\TA_MNTC2D_MAMP2024.gpkg' using driver `GPKG' Simple feature collection with 1101 features and 4 fields Geometry type: POLYGON Dimension: XY Bounding box: xmin: 865000 ymin: 6232000 xmax: 923000 ymax: 6267000 Projected CRS: RGF93 v1 / Lambert-93 C00_026384km_X889200Y6237761 ---- Création de la zone de calcul C00_026384km_X889200Y6237761 ---- Récupération du Lidar [1] "\"C:/QGIS/OSGeo4W.bat\" gdalbuildvrt C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761\MNT.vrt -input_file_list C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761/listepourvrt.txt" 0...10...20...30...40...50...60...70...80...90...100 - done. [1] "r.in.gdal -o --quiet --overwrite input=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761\MNT.vrt output=MNT" ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en charge dans Windows [1] "v.in.ogr -o --quiet --overwrite input=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761/Step_Cartino2d_1_Contour.shp output=Step_Cartino2d_1_Contour" ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en charge dans Windows [1] "v.in.ogr -o --quiet --overwrite input=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761/Step_Cartino2d_2_Valid_Calcul.shp output=Step_Cartino2d_2_Valid_Calcul" ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en charge dans Windows [1] "g.region --overwrite --quiet -a vector=Step_Cartino2d_1_Contour align=MNT" ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en charge dans Windows [1] "r.mask --quiet --overwrite vector=Step_Cartino2d_1_Contour" ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en charge dans Windows [1] "r.resamp.stats --quiet --overwrite input=MNT output=MNTmask1a" ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en charge dans Windows [1] "r.mask --quiet --overwrite vector=Step_Cartino2d_2_Valid_Calcul" ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en charge dans Windows ATTENTION: MASK already exists and will be overwritten [1] "r.univar --quiet --overwrite map=MNTmask1a output=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761/univar.txt" ATTENTION: Le verrouillage concurrent de jeux de cartes n'est pas pris en charge dans Windows ATTENTION: Read error: We're not at the start of a row ATTENTION: Erreur -72 de compression ZSTD : Src size is incorrect ATTENTION: Erreur -72 de compression ZSTD : SrcATTENTION: Erreursize is incorrect -72 de compression ZSTD : Src size is incorrect ATTENTION: Erreur de d�compression LZ4 ATTENTION: Erreur -72 de compression ZSTD : Src size is incorrect ERREUR : Erreur lors de la d�compression des donn�es raster fp pour la ligne 1 de : code d'erreur -1 ATTENTION: Erreur -72 de compression ZSTD : Src size is incorrect ATTENTION: Read error: We're not at the start of a row Appuyez sur une touche pour continuer...

Here is the same in GRASS

(Wed Sep 11 06:33:45 2024)
r.in.gdal -o --quiet --overwrite input=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761\MNT.vrt output=MNT (Wed Sep 11 06:33:46 2024) La commande s'est terminée (0 sec)
(Wed Sep 11 06:34:21 2024)
v.in.ogr -o --quiet --overwrite input=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761/Step_Cartino2d_1_Contour.shp output=Step_Cartino2d_1_Contour (Wed Sep 11 06:34:22 2024) La commande s'est terminée (0 sec)
(Wed Sep 11 06:34:51 2024)
g.region --overwrite --quiet -a vector=Step_Cartino2d_1_Contour align=MNT
(Wed Sep 11 06:34:51 2024) La commande s'est terminée (0 sec)
(Wed Sep 11 06:35:17 2024)
r.mask --quiet --overwrite vector=Step_Cartino2d_1_Contour
(Wed Sep 11 06:35:18 2024) La commande s'est terminée (0 sec)
(Wed Sep 11 06:35:47 2024)
r.resamp.stats --quiet --overwrite input=MNT output=MNTmask1a
(Wed Sep 11 06:35:47 2024) La commande s'est terminée (0 sec)
(Wed Sep 11 06:36:27 2024)
v.in.ogr -o --quiet --overwrite input=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761/Step_Cartino2d_2_Valid_Calcul.shp output=Step_Cartino2d_2_Valid_Calcul (Wed Sep 11 06:36:27 2024) La commande s'est terminée (0 sec)
(Wed Sep 11 06:36:46 2024)
r.mask --quiet --overwrite vector=Step_Cartino2d_2_Valid_Calcul
WARNING: MASK already exists and will be overwritten (Wed Sep 11 06:36:47 2024) La commande s'est terminée (0 sec)
(Wed Sep 11 06:37:16 2024)
r.univar --quiet --overwrite map=MNTmask1a output=C:\Cartino2D\France/MAMP2024_GMSH/C00_026384km_X889200Y6237761/univar.txt WARNING: Read error: We're not at the start of a row WARNING: Erreur -72 de compression ZSTD : Src size is incorrect WARNING: Erreur -72 de compression ZSTD : Src size is incorrect ERROR: Erreur lors de la décompression des données raster fp pour la ligne 2 de : code d'erreur -1 WARNING: Read error: We're not at the start of a row (Wed Sep 11 06:37:16 2024) Command ended with non-zero return code 1 (0 sec)

If needed, I can send you the input files Best regards

echoix commented 6 days ago

If it helps, I was trying to run windows tests with something closer to what OSGeo4W does. Part of that debugging I applied the same patches as they use, and saw similar messages about zstd in the logs. I didn't see them in our runs on main, that use a different script. I tried to run tests directly with the compiled-by-osgeo4w package, but I haven't gotten as far yet.

But I think we might need to check the actual build patches that OSGeo4W uses for this. And the fact that you get this for the released 8.4 while I'm playing with dev 8.5 is some more info

Rivages commented 4 days ago

I try 4 configs

"C:\QGIS\bin\grass84.bat" # BUG QGIS-OSGeo4W-3.38.2-1.msi "C:\GRASS83\grass83.bat" # OK WinGRASS-8.3.3dev-9baf6a727c-1-Setup.exe "C:\GRASS84\grass84.bat" # OK WinGRASS-8.4.0-1-Setup (1).exe "C:\GRASS85\grass85.bat" # BUG WinGRASS-8.5.0dev-adcdf28bb2-1-Setup.exe The bug is always in grass85, grass84 is ok but not with qgis install...