Repository navigation
games/13-sentinels-asia: wait for the render thread at frame end - #2936
Open
Haseenesss wants to merge 1 commit into
Open
Haseenesss wants to merge 1 commit into
Haseenesss wants to merge 1 commit into
Conversation
At the end of a frame the main thread waits for the render thread only as long as the frame's time lasts (main+0x30c194), then goes on without it. The render thread's first submission waits on the host for the pipeline archive and the prepare step. From a library folder on a USB 2.0 disk that wait was 7 s and more, the main thread ran on meanwhile, and the render thread's first draws bound a texture entry of index -1: SIGSEGV at main+0x309128, in 13 of 13 starts with a wait of 7 s or more and in none of 8 below 6.5 s (Mac, M2, 8 GB). patches.py cuts the three branches that end the wait in the 1.00 build of main, so the main thread waits until the render thread is done. 9 of 9 starts ran with the cut; none of them had a wait of 7 s, since the main thread no longer reads from the disk meanwhile. The western release was not checked. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
13 Sentinels: Aegis Rim, Asian release (
01008D7016438000, base 1.00) crashes about 9 s after the start, before the logo, when the start is slow:SIGSEGVatmain+0x309128.main+0x30c194), then goes on without it (a skipped frame). The render thread's first submission waits on the host for the pipeline archive and the prepare step. From a library folder on a USB 2.0 disk (a 131 MB archive) that took 7 s and more. The main thread ran on meanwhile, and the render thread's first draws bound a texture entry of index -1.dm/games/01008D7016438000/patches.pycuts the three branches that end the wait in the 1.00 build ofmain, so the main thread waits until the render thread is done. A frame the render thread cannot finish in time now makes the game slower instead of being skipped.Reported in LNPANDY/NX2Apple#1411, which carries this as a patch until it lands here. The finding is in the game's note under "Found on this game".
Details
DM_NVN_ENC_THREAD,DM_NVN_PREFETCH,DM_PSO_PREBUILD,DM_PSO_PREPARE=0andDM_PREEMPT=1did not change it.x0= entries +0xffffffff×0xe8atldr w27, [x0], after the texture object's entry getter was called with index -1. Backtracemain+0x30c81c main+0x2bfadc main+0x2b1a8c main+0x2b1e94 main+0x2fc3c0 main+0x308a40 main+0x30bd24.Checked
dm/tools/tests/test_docs.py;docs_patches.pyanddocs_symptoms.pywere run.patch_nso.pyon the game'smainapplies the three cuts (cuts 3), and its output is the binary that was run.01008D70164380001.00 (v0) on the Mac, 9 starts with the cut, each run for 30 to 40 s (1200 to 1800 frames) through the logos, none crashed.01003FC01670C000) was not at hand: itsmainis another build and gets no cut here. Not run on an iPhone. Only the first 40 s of the game were run.Docs
docs/reference/<subsystem>.mdentry, andpython3 dm/tools/docs_symptoms.pywas run (the symptom index)🤖 Generated with Claude Code