From cc3c69a2cc42a960167819e1e843017f99d5e8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 26 Sep 2026 08:52:49 -0400 Subject: [PATCH] CI: Dump grass_gis.8.6.dll exports/imports to find the crashing symbol (not for merge) Package-level dumpbin diffs of every OSGeo4W package that changed in the 2026-09-25 regression window (gdal313-runtime, python3-gdal, curl, openssl, libjpeg-turbo, expat) found no removed exports or broken ordinals, PROJ is unchanged since April, and downgrading the MSYS2 mingw-w64 toolchain snapshot (crt/headers/winpthreads) to a much older build still reproduces the crash. So none of the previously suspected packages explain: Windows fatal exception: code 0xc0000139 happening in ctypes.CDLL.__init__ while grass_gis.8.6.dll (and grass_arraystats/grass_rowio/grass_vector, which link it) get loaded. This dumps the actual freshly compiled DLLs' dependents and full import tables right after the Compile GRASS step, to find the exact missing/unresolved symbol directly instead of guessing at packages. Temporary, for CI investigation only. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/osgeo4w.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/osgeo4w.yml b/.github/workflows/osgeo4w.yml index 96b5a6bb9aa..35c471ea71e 100644 --- a/.github/workflows/osgeo4w.yml +++ b/.github/workflows/osgeo4w.yml @@ -110,6 +110,46 @@ jobs: env: MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }} + - name: "[CI diagnostic, not for merge] Dump grass_gis.8.6.dll exports/imports" + # Finds the exact missing symbol behind the + # "Windows fatal exception: code 0xc0000139" crash seen when + # ctypes loads grass_gis.8.6.dll. Package-level dumpbin diffs of + # gdal313.dll, curl, openssl, libjpeg-turbo, expat, and proj (the + # only OSGeo4W packages that changed in the regression window) + # found no removed exports or broken ordinals, and downgrading + # the MSYS2 mingw-w64 toolchain snapshot didn't fix the crash + # either, so this inspects the freshly compiled DLL directly. + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + $dumpbin = & $vswhere -latest -products * -find '**\dumpbin.exe' | Select-Object -First 1 + if (-not $dumpbin) { + Write-Output '::error::dumpbin.exe not found via vswhere' + exit 1 + } + Write-Output "Using dumpbin: $dumpbin" + + $dlls = @( + 'dist.x86_64-w64-mingw32\lib\libgrass_gis.8.6.dll', + 'dist.x86_64-w64-mingw32\lib\libgrass_datetime.8.6.dll', + 'dist.x86_64-w64-mingw32\lib\libgrass_arraystats.8.6.dll', + 'dist.x86_64-w64-mingw32\lib\libgrass_rowio.8.6.dll', + 'dist.x86_64-w64-mingw32\lib\libgrass_vector.8.6.dll' + ) + foreach ($dll in $dlls) { + if (-not (Test-Path $dll)) { + Write-Output "::warning::$dll not found, skipping" + continue + } + Write-Output "::group::$dll dependents" + & $dumpbin /dependents $dll + Write-Output '::endgroup::' + Write-Output "::group::$dll full import table" + & $dumpbin /imports $dll + Write-Output '::endgroup::' + } + - name: Print installed versions if: always() shell: msys2 {0}