From 2a098eb3c4e174e9ce4611be409c77db8b3a71fb Mon Sep 17 00:00:00 2001 From: James Dansereau <106631954+jkdansereau@users.noreply.github.com> Date: Wed, 2 Sep 2026 20:55:22 -0400 Subject: [PATCH] =?UTF-8?q?docs(D185):=20fresh=20d69=5Femit.py=20run=20pro?= =?UTF-8?q?duces=20a=20crashing=20pccg=20sidecar=20=E2=80=94=20alpha=20blo?= =?UTF-8?q?cker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/dev/findings.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/dev/findings.md b/docs/dev/findings.md index 1daabd6b..a10f4fe2 100644 --- a/docs/dev/findings.md +++ b/docs/dev/findings.md @@ -5018,3 +5018,41 @@ golden + a Streets/Dam/Archives load. Docs only: this subsection + the §F index rows (D88.4 status, new D132 row). No code changed; the proposed diff above is not applied. No temp probe scripts left. + +## D185 — fresh `d69_emit.py` run yields a game-crashing `data/pccg-/` (M-38) + +**Status: OPEN — alpha-release blocker.** (Add to the §F index.) + +**Symptom.** `python tools_pc/d69_emit.py ntsc-final` in this repo writes +`data/pccg-ntsc-final/pccg.bin` = 3346895 B (52 sidecars, 1856-B manifest), +prints `ALL CHECKS PASSED`, and `-level_09` / `-level_20` then segfault before +frame 1 (`EXCEPTION: 0xc0000005`, faulting return address is an ASCII +model-name string). The pre-migration working sidecar +(`C:/Users/james/Source/Repos/007/data/pccg-ntsc-final/pccg.bin`, 3604378 B, +2421-B manifest) drops into this tree and `-level_09` runs crash-free. + +**Isolation done (M-38).** +- Not the romdata M-38 change: baseline (stashed) crashes identically. +- Not the build: same exe, only the `data/pccg-ntsc-final/` bytes swapped. +- `tools_pc/d69_emit.py` is byte-identical between the public repo and the + pre-migration repo `007` (only a doc-path comment differs). +- The migration commit `52539d10 "Prepare for public release"` normalised the + committed d69 inputs from CRLF to LF: `scripts/filelist.u.csv` (−812 B, one + CR/line) and `assets/obseg/file_resource_table.inc.c`. +- **Restoring CR to both inputs did NOT restore the 3604378-B output** → line + endings are not the (whole) cause. Some other part of the d69 input closure + regressed in the history rewrite, or the working sidecar predates a real + d69/​input change and 3346895 is a separate second bug. +- `d43_emit.py` is unaffected (its `find_row` tries `name`, `name[1:]`, + `name[:-1]`, `name[1:-1]` — tolerant of a mangled basename; `d69`'s + `fl_by_base.get(basename)` is exact). + +**Impact.** `docs/building.md` tells users to run `d69_emit.py`; M-38's +`prepare-assets.py` does the same. Both currently produce a broken game on a +clean checkout. The committed `data/` dirs (carried from pre-migration) hide it. + +**Next.** Diff the sidecar *name* set: pre-migration `manifest.csv` vs a fresh +run's — find which bg/stan entries d69 now drops, trace through `find_row` → +`file_resource_table.inc.c` → `filelist.u.csv`. Fix so a fresh run reproduces +3604378 B / 2421-B manifest; re-verify `-level_09`/`-20` crash-free. Do NOT +regenerate `data/pccg-ntsc-final/` before the fix (it holds the working copy).