Repository navigation
Fix Windows CI test run: 0xc0000135 (missing libpng16-16.dll on PATH) (issue 7) - #11
Conversation
|
good - but tests still nothing to pring - please add readable output of tests. |
|
Done (commit 1ae96ec). The test executable now prints a readable report for the CI log: a per-test line with noise value min/max/mean, the generated PNG size and PASS/FAIL (with a reason on failure), plus a final 'Result: N/3 tests passed' summary; the test target returns a non-zero exit code when any check fails. Each image is checked for the documented [-1, 1] value range and that its PNG was actually written. Generated PNGs are byte-identical in size to before (103274/211556/185219 bytes). CI on this push verifies both legs. |
|
Merged into main as b4be1e9 — thanks for the review! Verified the merged head locally (configure + build + test target): 3/3 tests pass, readable per-test report in the log. |
Fixes the failing
windows-latest (Release)leg of the CI pipeline delivered inPR #10. After the merge,
workflow_dispatchrun 38415068822 on main(2026-10-13T14:38Z) failed in
Run Tests; the Linux leg passed. Related: #7.Root cause (two independent Windows issues)
1. STATUS_DLL_NOT_FOUND (0xc0000135) —
OpenSimplex2tests.exe(built withthe aqt MinGW) links against the MSYS2
mingw-w64-x86_64-libpngand at runtimeneeds
libpng16-16.dll(+libz-1.dll) from<msys2>/mingw64/bin. Butmsys2/setup-msys2@v2adds only the MSYS2 root to the Windows PATH (verifiedagainst the action source, SHA ec48f7c), so the DLL search path never reaches
mingw64/bin. Thetesttarget's deploy step (cqtdeployer clear) copies theMinGW runtime but cannot find
libpng16-16.dll(the same "Cannot find thelibrary for dependency libpng16.so.16" notice is printed on the Linux leg, where
the OS loader finds the system libpng — which is why Linux passed).
2. Stack overflow (0xc000013d, exposed by fix 1) — once the DLLs resolved,
the test executable crashed with
Stack overflow:main()intests/test_OpenSimplex2F.callocates three512x512xuint32_tbuffers (3 x 1MB)on the stack. The default Windows thread stack is 1MB; Linux only survives
because its default stack is 8MB.
Fix
<msys2-location>/mingw64/bintoGITHUB_PATHright after the MSYS2 setup step, so the test executable canresolve the MSYS2 DLLs at runtime (
.github/workflows/ci.yml, +9 lines).main()are moved to static storage (static-> BSS), removing the 3MB stack usage on all platforms
(
tests/test_OpenSimplex2F.c, +8/-3 lines). Test output is unchanged.Verification
cmake --build build --target testexit 0; test2d/test3d/test4d.png regenerated with identicalsizes (103274/211556/185219 bytes).
pull_request) runs on every push — the first run (38417362685)confirmed fix 1 (error moved 0xc0000135 -> 0xc000013d); the run triggered by
this commit verifies fix 2 end-to-end.
Review round (2026-10-13): readable test output
EndrII: "good - but tests still nothing to print - please add readable output
of tests."
function name, min/max/mean of the generated values, the generated PNG with
its byte size and PASS/FAIL per image, plus a final "Result: N/3 tests
passed" summary. On failure it prints the reason and returns a non-zero
exit code so the
testtarget fails loudly. Each image is validatedagainst the documented [-1, 1] noise range and that its PNG was actually
written (commit 1ae96ec).
ubuntu-latest (Release)andwindows-latest (Release)both green; the readable report is visible inthe
Run Testslog of both legs (noise min/max/mean identical on Linuxand Windows).