![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Established 2026-10-03 against 7e5db63669 (plus the uncommitted changes that made the suite build), on MSYS2 UCRT64: clang++ 22.1.8 with libstdc++, Ninja, Debug, in a separate build tree. Every number below was measured on that run.
Until this date the suite had never been built on Windows: BUILD_TESTING defaulted to ON in Debug on Linux only (fa2b44a500), and nothing ran ctest in CI anyway (see ci.md). The first build turned up the problems below, in this order. Result after the fixes: 24 of 25 ctest entries pass reproducibly; masks_geometry is intermittent (last section).
2026-10-27, on top of b0f10525fd, GCC 16.2 UCRT64 Debug on GitHub's windows-latest.
The first CI runs of the suite with GCC failed test_import_jobs on an access violation in every run: 5 of 5 standalone runs per cell, in both Debug cells. gdb put it in dt_gui_main_window(), reading dt_gui_get_global()->ui with no GUI, called from global_progress_start() (control/progress.c) under dt_control_import() → job creation → dt_control_job_add_progress(). Every job with a progress bar goes there. On Windows that function drives the taskbar button through ITaskbarList3 and fetched the main window's HWND without asking whether there was a GUI; Linux talks to D-Bus there and needs no window. The taskbar functions now do nothing without a main window (_taskbar_window()), which covers ansel-cli as well as the tests.
Earlier imports in the same process went through the same path without crashing, and the first crashing subtest was not always the same one (nofeatures: always the last one; skiptest: once _test_public_copy_failure_reservation_forces_sibling_fallback, then always the last one). The HWND is fetched only once CoCreateInstance(CLSID_TaskbarList) has succeeded. Ansel never calls CoInitialize, so that probably needs a library thread to have created the process's multithreaded apartment first: at the crash, a GIO pool-0 thread was inside Windows.ApplicationModel. Unconfirmed: nothing logged the HRESULT of the calls that failed.
tools/statelessness_audit.py only knew ELF: it looked for .o files and parsed objdump -t's ELF layout. CMake writes .obj on Windows, and those are COFF, where objdump -t gives each symbol a section NUMBER ((sec 3)) instead of a name. The audit now picks the suffix by platform and reads both layouts, mapping section numbers to names through the one symbol objdump emits per section; .rdata counts as read-only, .tls as state, and the __imp_ prefix of a call into another DLL is dropped. Accepting .obj alone would have been worse than nothing: the ELF pattern matches no COFF line, so every object would have read as symbol-free and the gate would have passed without checking.
Measured on the Debug test tree: 571 translation units read, 288 holding state of their own. First finding (resolved the same day): src/system/resource_limits.c reached state through src/win/rlimit.c (static BOOL rInitialized, static rlimit_t rlimits[]) — Windows-only code, so the Linux CI never saw it. That file emulated getrlimit/setrlimit over a table, and had no effect: its getrlimit(RLIMIT_STACK) answered RLIM_INFINITY, so dt_set_rlimits_stack() never called setrlimit, and even that only wrote the table — Windows fixes the main thread's stack at link time and no call changes it afterwards. Its other exports (rfwrite, _rwrite) had no caller (grep). win/rlimit.{c,h} are deleted and dt_set_rlimits() is empty on Windows.
Two separate things.
Baseline drift, reproducible. The committed baselines were rendered on Linux. On UCRT64, nine renders differ from them on every run: at worst 25 per channel (brush-1313-cusp-5184x3888-overlay, 369 px) and at most 0.0243 % of the pixels (polygon-comb-overlay), including one alpha mask (brush-1074-flare), so not cairo alone. All coverage checks pass on the same run. tests/masks/masks_geometry.c has Windows bounds (delta 32, share 0.0004) for this.
Large differences, intermittent — not explained. Twice in about 45 runs, one case (a different one each time) came out with 1 to 7 % of its pixels at a delta of 255 (brush-1313-cusp-5198x3904, ellipse-rotated-overlay); 26 runs in a row then passed. The coverage oracle passed on the failing runs: it judges the mask from one dt_masks_debug_rasterise() call, while each PNG comes from another rasterisation inside dt_masks_debug_write_png(), so it is a later rasterisation that differs. The output buffer is zeroed (dt_calloc_align_float). Both failures happened while the machine was busy (a ninja had just finished; other files in the tree were changing), which points at a thread race in dt_masks_get_mask_roi() — unconfirmed: no failing image was captured. Next step: loop the test under load or with varied OMP_NUM_THREADS and keep the PNGs of the first failure.
CI cannot see either (2026-10-27, on top of b0f10525fd): both are differences against the baselines, which are compared only where tests/image_test/samples is cloned, and no workflow clones it (ci.md). Reproducing them takes a local run with the bank.