Skip to content

Fix Windows CI test run: 0xc0000135 (missing libpng16-16.dll on PATH) (issue 7) - #11

Merged
EndrII merged 3 commits into
QuasarApp:mainfrom
QuasarAppCI:task_7
Oct 13, 2026
Merged

EndrII merged 3 commits into
QuasarApp:mainfrom
QuasarAppCI:task_7

Conversation

@QuasarAppCI

@QuasarAppCI QuasarAppCI commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Fixes the failing windows-latest (Release) leg of the CI pipeline delivered in
PR #10. After the merge, workflow_dispatch run 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 with
the aqt MinGW) links against the MSYS2 mingw-w64-x86_64-libpng and at runtime
needs libpng16-16.dll (+ libz-1.dll) from <msys2>/mingw64/bin. But
msys2/setup-msys2@v2 adds only the MSYS2 root to the Windows PATH (verified
against the action source, SHA ec48f7c), so the DLL search path never reaches
mingw64/bin. The test target's deploy step (cqtdeployer clear) copies the
MinGW runtime but cannot find libpng16-16.dll (the same "Cannot find the
library 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() in
tests/test_OpenSimplex2F.c allocates three 512x512xuint32_t buffers (3 x 1MB)
on the stack. The default Windows thread stack is 1MB; Linux only survives
because its default stack is 8MB.

Fix

  1. One Windows-only workflow step appends <msys2-location>/mingw64/bin to
    GITHUB_PATH right after the MSYS2 setup step, so the test executable can
    resolve the MSYS2 DLLs at runtime (.github/workflows/ci.yml, +9 lines).
  2. The three image buffers in 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

  • YAML validated; total diff: 2 files, +17/-3.
  • Linux leg re-verified locally: configure + build + cmake --build build --target test exit 0; test2d/test3d/test4d.png regenerated with identical
    sizes (103274/211556/185219 bytes).
  • PR CI (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."

  • The test executable now prints a per-test report for the CI log: noise
    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 test target fails loudly. Each image is validated
    against the documented [-1, 1] noise range and that its PNG was actually
    written (commit 1ae96ec).
  • CI run 38422350598 (head 1ae96ec): SUCCESS — ubuntu-latest (Release) and
    windows-latest (Release) both green; the readable report is visible in
    the Run Tests log of both legs (noise min/max/mean identical on Linux
    and Windows).

@EndrII

EndrII commented Oct 13, 2026

Copy link
Copy Markdown
Member

good - but tests still nothing to pring - please add readable output of tests.

@QuasarAppCI

Copy link
Copy Markdown
Member Author

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.

@EndrII
EndrII self-requested a review October 13, 2026 15:53
@EndrII
EndrII merged commit b4be1e9 into QuasarApp:main Oct 13, 2026
2 checks passed
@QuasarAppCI

Copy link
Copy Markdown
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants