Hades (PPSA03355) on Windows: start-up faults in the title's own libc.prx before any file is opened #2724
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T12:17:16Z.
Hades (PPSA03355 v01.003.000) on Windows: start-up faults in the title's own
libc.prxright after "Transferring control to ELF entry point", before any file is openedOn Windows the title does not get as far as the Linux runs in #2276, which reach its texture upload pool after #1798 and #861.
What the code does at that address (disassembly of the title's own
libc.prx, vaddr0x14150to0x141b2): a call to an internal function at0x3850(it adds two arguments and compares the result withrbp, it is not an import stub), then a loop ofvmovups [rax+rdi*8-0x60..], ymm0stores that zero-fills the buffer the call returned. At the faultraxis0x80020002, which looks like an SCE error code (ENOENT) rather than a pointer, so something that returns a buffer failed and the result is used unchecked. I did not identify which call returned it.What is established
libc.prxnormally on the same setup: New Joe & Mac (PPSA02801) and Dredge (PPSA09076) reach the PSNCore parameter check of #918/#846 instead. So the rebuild itself looks sound, but I cannot exclude it for Hades because no original ELF is available to compare.Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, NVIDIA GeForce RTX 4080 SUPER. Libraries built on
mainatb5f5362dplus two unrelated stub exports and #1091. Relinked with--windows --registry;libfmod.prxandlibfmodstudio.prx(which sit next toeboot.binin the dump) were relinked asprx/modules. Dump from my own digital copy; no game files shared. AI-assisted.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T13:15:22Z.
Correction to the analysis above: the fault is not in a zero-fill loop. I disassembled the original ELF at an address that belongs to the converted PE image. In the converted module the bytes at
libc.prx.guest.prx+0x141b0arecd 45 90 0f 0b(int 0x45; nop; ud2), reached from a small function at+0x141a0that stores0xA002000Binto a per-thread slot (through a relinker-generated thunk in.gtcode) and then executesint 0x45. So the title's own libc enters a fatal path, and Windows reportsint 0x45as an access violation. The caller (+0x15bda) is a wrapper that calls through a function pointer at+0x120ef0.What made it take that path is not identified.
rax = 0x80020002at the fault looks like an error code ("not found"). Hades importssceLibcInternalBacktraceForGameandsceLibcInternalHeapErrorReportForGame(the audit lists both as stubs here); I have not checked whether they are involved. The audit numbers and setup above stand.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T01:27:24Z.
Cause found, and it was not a fault in the title's libc: the title is trying to
dlopen("/app0/libfmod.prx", RTLD_NOW), ourdlopenfails ("Windows loader error", seeDynamicLoader.cpp), and the title's libc treats that as fatal (theint 0x45I described above, with the loader message string sitting in the memoryrdipoints to). I traced it with a gdb breakpoint ondlopen_nid_postfix:libfmod.prxis the only path requested before the fault.Why it fails: the relinker writes modules found in a
prxinput directory toapp0/prx/<name>.guest.prx, butdlopenlooks for<requested path>.guest.prxnext to the requested file, i.e.app0/libfmod.prx.guest.prx. This title keepslibfmod.prxandlibfmodstudio.prxat the root of the game directory, so the relinked modules were never found. This is the situation #846 (--module-dir) is about.Check: I copied
app0/prx/libfmod.prx.guest.prxandapp0/prx/libfmodstudio.prx.guest.prxtoapp0/and ran again on currentmainplus my other branches. The fault is gone: the title ran the full 90 s I allowed, mounted its save directory, compiled shaders (245 in the first 10 s of rendering) and created textures, with no error in the log. I did not look at the window.So: Hades needs no code change beyond what #846 describes; this issue can be read as another case for it.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T13:07:41Z.
Follow-up now that
--module-dir(#846) is onmain: it does not cover this title's layout. Hades keepslibfmod.prxandlibfmodstudio.prxin the root of the game directory, next toeboot.bin. The option takes a directory relative to the parent of the input ELF, and.is accepted as a path, but the relinker then scans the whole directory including the executable:(
in/holdingeboot.elf,sce_module/,libfmod.prx,libfmodstudio.prx.) So root-level runtime modules still need the workaround from above (copy the relinked.guest.prxfiles next to the originals underapp0/). A fix would need either the main executable skipped when it is in a--module-dir, or a way to name individual files; I have not tried either and do not know which fits the project better.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-11T18:07:32Z.
@xXPBSXx #3850 implements the first option from your 13:07Z comment: the input executable is skipped when a
--module-diris scanned, so--module-dir .now converts the modules next toeboot.elf. Root-level modules are written toapp0/<name>.guest.prx(previously the path would have beenapp0/./…). That is the pathdlopen("/app0/libfmod.prx")checks, and it matches the layout your copy workaround produced. The PR carries #3509's commit, which makes.count as a runtime-loaded directory; without it the modules would go into LinuxDT_NEEDEDand start at load.I don't have a Hades dump, so I could only test with the relinker's fixtures (Linux host, relinker-only build, Linux and Windows output). Could you try it on Windows without the manual copy?
Keep
libfmod.prxandlibfmodstudio.prxonly in the game root (not also inprx/), and write the output outside the game directory. Expected: the relinker listslibfmod.prx.guest.prxandlibfmodstudio.prx.guest.prxunderapp0/, and the title gets past thedlopenwithout copying anything.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T21:33:55Z.
With #3850 (
--module-dir .) thedlopen("/app0/libfmod.prx")failure from this issue is gone on Windows (details on #3850). Hades (PPSA03355) then gets as far as opening ~1200 files, mounting its save data and compiling ~220 shaders (I did not time it) and stops on the render thread, with the same result in two runs of up to 90 s:The caller is a row-copy loop at
app.exe+0x318059:rdi = base + offset,rsi = source,rdx = [rsp+0x78]bytes (0x1830), where the destination base is read from the loop's frame at[rsp+0x10]and is 0 here, so the firstmemcpywrites to a null pointer. The source holds a repeating0x80, 0xaaaaaaac00000000pattern.With
APS5_TRACE_MEMORY=1the last memory calls before the fault are four direct-memory allocations that all succeed (256 MiB at0x300000000, 3 GiB at0x310000000, 64 MiB at0x3d0000000, 256 MiB at0x3d4000000), so a failing direct-memory map is not visible there; a failing flexible-memory or other call would not be traced. Not established: where the null base comes from (an API of ours that returned a null pointer or an error, or a title-side value), and whether this is a GPU-side mapping (the copy looks like a row-by-row upload). I am not looking at the GPU side; that is for the GPU session.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T21:38:25Z.
Follow-up to the render-thread fault above: it is intermittent and not caused by #3850's layout. With the manual workaround layout (relinked without
--module-dir,libfmod.prx.guest.prxandlibfmodstudio.prx.guest.prxcopied fromapp0/prxtoapp0/), two 90 s runs on the same build: one ran to the limit, one faulted on theRenderThreadat the samelibc.prx.guest.prx+0x13a15. With--module-dir .it faulted in 2 of 2 runs. Another run onmainc5da8233awith the workaround layout (the GPU session, 120 s) did not fault. So the stop is timing-dependent; I have not found why.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T21:39:54Z.
Where the null destination in the
memcpyatapp.exe+0x318059comes from, read from the relinked image (static disassembly withobjdump, no run of the crash itself; my own 120 s run with the module copies reached the same point, saving and textures, but did not crash in that run):Source texture offset beyond passed data size. The destination base[rsp+0x10]is set atapp.exe+0x317f1cas*(*out)whereoutis filled by the callee atapp.exe+0x32a8e0.+0x32aa30,rdi= the global at0x1424bf150) and, when the allocator returns non-zero, logs a message from the engine's Prospero renderer source (Prospero.cpp, line0x3f0= 1008) with the textFailed to allocate memory for texture, sets the result to 0, and returns. The caller does not check it and copies into the null base.APS5_TRACE_MEMORYlist above all succeed, so the failing call is another one.Suggested next step for whoever continues (not done): log the arguments and return value of the allocator call at
+0x32aa30(or break on the error log at+0x32aa55, under the game lock) and the lastsceKernel*Memory*calls before it, to see the requested size against whatsceKernelAvailableDirectMemorySizereports. The offsets belong to this relink ofmainc5da8233aand shift with the build.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T04:57:41Z.
Re-check for PPSA03355 (this issue) and PPSA03490 on
mainceb342b94(no open PR), Windows 10, GCC, one 60 s run each: both still fault at the title'slibc.prx.guest.prx+0x141b0with a read of0xffffffffffffffff(03355:rax/rdx0x80020002; 03490:rax0xdeadbeefcafebabe). Import audit: 0 absent imports for both. Posted here instead of a new issue.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-12T05:26:30Z.
@xXPBSXx
ceb342b94(#4240, 02:00Z) predates #3850, which merged at 03:07Z as26d87eec2. On that build--module-dir .cannot convert root-level modules, solibfmod.prxandlibfmodstudio.prxstay out ofapp0/,dlopen("/app0/libfmod.prx")fails with0x80020002(therax/rdxyou see), and the title's libc takes its fatal path at+0x141b0. Onmainat or after26d87eec2, relinking with--windows --registry --module-dir .(the two modules only in the game root, not also inprx/) should match your #3850 test onc5da8233a.PPSA03490 reaches the same libc fatal path from a different cause (Unreal
LowLevelFatalError,rax0xdeadbeefcafebabe), which #4238 tracks.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T08:53:40Z.
Confirmation for the Hades relink line, tested on
32e62f2f7(upstream/main, contains #385026d87eec2and773f8de7b; Windows 10, GCC Release):_rA9),relinker --windows --registry --module-dir .on the reconstructed ELF folder (libfmod.prxandlibfmodstudio.prxin its root,sce_modulewith 6 more): 8 modules convert, relinker exit 0, import auditabsent 0(470 implemented, 11 stub, 252 module-provided imports).--module-dir .layout runs here; I did not capture a log line showing thedlopenof the two fmod modules (the log has nolibfmodlines), so "dlopen ok" is inferred from the clean start and the converted registries (app.libfmod.prx.guest.prx.registry.json,app.libfmodstudio...), not shown directly. I also did not judge picture or sound.ceb342b94sweep, which predates #3850, as you said. Separately, Hades still showed an intermittentRenderThreadnull write (libc.prx+0x13a15) in about 2 of 8 earlier 150 s runs on a main from before this one (tracked in #3209); it did not occur in these two.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-12T10:18:45Z.
Thanks for confirming on
32e62f2f7.