feat(tools): add module_check.py to load a title's converted DLLs one by one #29
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!29
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/29/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Dark3581 on GitHub · 2026-11-22 02:12 UTC · original
Dark3581:feat/module-check→main· +334 −0 · 8 files · 2 commits · merged 2026-11-22 02:17 UTCWhat
A way to check a title's converted DLLs before (or without) its executable:
anybox-module-probe.exe(built into the build root, Windows only) loads one DLL withLoadLibraryW, which runs itsDllMain, and printsloadedorfailed <Win32 error>. A vectored handler records the last error-class exception raised during the load, so a fault insideDllMain, which the loader reports only asERROR_DLL_INIT_FAILED(1114, measured here on Windows 10 19045), is printed with its code, module and offset.tools/module_check.py <converted folder> --build-dir buildcopies the probe into the folder (so the title's own copies of runtime DLLs win the search order), runs it once per converted DLL (those with a.registry.json; every non-ab_*DLL when none has one), each in its own process with its ownANYBOX_REPORT, and classifies the result: loaded, failed (with the fault when there was one), stopped (not-implemented/unsupported, with library and function from the run report), crashed, or timeout. Exit code 1 when any module does not load;--jsonwrites the results.Tested
module_check,tools_test_module_check);module_checkpassed 10 repeats.module_checkbuilds four fake modules (DllMain returns TRUE, returns FALSE, callsD3D12XboxCreateDevice, writes through a null pointer) plus one without a registry file, and checks each classification, the skipped module and that the probe is removed again.python -m unittest discover -s tools/tests: 52/52, including module selection, output parsing and messages.check_conventions.py,debt_fold.py --check,progress.py --jsonpass.main: 16 of 16 load. No game data in the PR.Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.mdLoadLibraryW,AddVectoredExceptionHandler,GetModuleHandleExWdocumentation; loader behaviour for a fault inDllMainmeasured on Windows 10 19045