Infinite loop at sceGsSyncVCallback (0x006E5380) & MSVC LTO Linker hang on large projects
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cmake, cpp
- Domain
- build-system, reverse-engineering
Research direction
The hang is at PC 0x006E5380 (sceGsSyncVCallback), so start with how stubs in config.toml and ps2_game_overrides::bindAddressHandler in loi_override.cpp are consumed by the runtime, since both were tried and neither stopped the [run:tick] output. Separately, check whether INTERPROCEDURAL_OPTIMIZATION in CMakeLists.txt reaches the ps2EntryRunner target. Done means the tick loop stops at that address and the link finishes without /GL. This needs runtime and build-system knowledge, so it is not a good first task.
Written by the indexing model from the issue text.
Description
Hi! First of all, thank you for the incredible PS2Recomp framework.
I am trying to recompile Castlevania: Lament of Innocence (USA, SLUS-207.33). The recompilation itself was a massive success: ps2_recomp.exe generated 11,078 functions with 0 decode failures. The game successfully loads and initializes PS2 system modules (SDRDRV, LIBSD, SIO2MAN).
However, I am hitting two blockers. To save your time, I have prepared a clean repository with my configs, CMake, and the override file:
👉 https://github.com/Om3g4-Dev/Castlevania-LOI-Recomp
Here is a summary of the issues:
1. Infinite loop at 0x006E5380 (sceGsSyncVCallback)
The game gets stuck in an infinite loop at pc=0x006E5380. I tried two approaches:
- Adding
"ret0@0x006E5380"tostubsinconfig.toml. - Using
ps2_game_overrides::bindAddressHandler(runtime, 0x006E5380, "sceGsSyncVCallback")inloi_override.cpp.
Neither worked. The runtime continues to output[run:tick] pc=0x6e5380indefinitely. Is this address a special callback that requires a different handling mechanism?
2. MSVC Linker Hang (LTO)
When building ps2EntryRunner with 11,000 generated .cpp files, link.exe consumes 4.4+ GB of RAM and hangs for hours due to the /GL (Whole Program Optimization) flag. I added INTERPROCEDURAL_OPTIMIZATION FALSE to CMakeLists.txt, but it didn't seem to take effect on the build time. Is there a recommended way to disable LTO for generated targets?
Any advice on these two issues would be greatly appreciated. Thank you!
- Dominant language
- C++
- Stars
- 3.3k
- Forks
- 149
- Avg merge
- 8h 46m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ran-j/PS2Recomp
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ran-j/PS2Recomp#393 · 1 comment ·
Maintainers usually reply within 5 days
-
EE sceCdStatus stub always reports READ (6), hanging games that wait for PAUSEPossibly taken @ahmedgamalalzatary claimed this 12 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 5 days
-
VU0 macro VSQI / VSQD: address and source registers swapped in generated codePossibly taken @yanm1103 claimed this 19 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 5 days
-
Runtime: SampleTexture casts unbounded or NaN texture coordinates to int, which is undefined behaviourMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ran-j/PS2Recomp#273 · 2 comments ·
Maintainers usually reply within 5 days
-
Build: /Qspectre- is MSVC-only and breaks every Release target under clang-clPossibly taken @ahmedgamalalzatary claimed this 12 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 5 days
Similar issues
-
Code: Performance
Difficulty 1/5 Under an hour Newbie friendliness 88/100
CrimsonCrossBunker/Cataclysm-Cleanwater-Bomb#1167 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
meshcore-dev/MeshCore#3760 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
deepseek-ai/DeepGEMM-Ascend#29 ·
Maintainers usually reply within 1 day
-
ci Windows
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aethersdr/AetherSDR#7003 · 1 comment ·
Maintainers usually reply within 1 day