Repository navigation
Conversation
JJenkx
marked this pull request as ready for review
October 14, 2026 17:38
4 tasks done
This was referenced Oct 14, 2026
Merged
This was referenced Oct 14, 2026
Collaborator
7 tasks done
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
Keep the AudioOut2 port vector and its mutex alive until process termination. Guest audio calls can continue while the host runs static destructors; destroying the table lets
AudioOut2CaptureGrainpop queued pointers from destroyed deques. Explicit port/context destruction still releases entries and slots remain reusable during normal execution. This records the remaining process-finalization ordering gap in technical debt.The trigger was Astro Bot PPSA21564 closing its window after reaching the hub. Two runs aborted with
double free or corruption (out). In the debugger-assisted repeat, the abort came from the 512-byte deque-block deallocation inAudioOut2CaptureGrain, called bysceAudioOut2ContextPush, while another thread was inside host exit and static destruction. This change gives the shared table the lifetime its callers require; it does not alter PCM conversion or mixing.Tested
Linux x86-64, GCC Release: all five AudioOut2 cases pass with SDL dummy audio: pad mix, latency, port layouts, port buffers and timing. Final-source cases pass in 3.70 seconds.
Native Astro validation used the existing converted PPSA21564 app,
-lvl hub_crashsite, on a pinned local compact-capture stack based on maine34c47921. Compact-versus-IR verification stayed enabled. The original stack exited 134 both without a debugger and under GDB. The vector-lifetime repair reached the same hub and exited 0 under GDB after a normal close request at 214.25 seconds; the failing warm repeat was closed at 214.30 seconds. Kernel settings were restored. The final version also retains the mutex for the same lifetime. Its debugger-free repeat reached the standing hub, accepted a normal close at 230.13 seconds and exited 0; kernel settings were restored. The final source passes the five AudioOut2 cases again. Thus both original runs aborted, while both repaired runs closed cleanly (one under GDB, one without it). No FPS or audio-quality improvement is claimed.This branch is one commit on main
e154f565852. ItsAudioOut2Port.cppblob is identical to the final native-validation stack; the compact-capture changes are not included in this PR. Full Linux/Windows CI run 38607889852 passed for the standalone repair on maine154f565852: Linux 1,118 passed / 57 skipped; Windows 766 passed / 433 skipped; zero failures. All five AudioOut2 cases ran and passed on both platforms. The final native repeat has also passed. Raw title logs and binaries remain local.Two additional native Astro runs on private integration
980559f158d(main4d5411d7b5dplus the prebuilt-pack topics and this repair) also reached the standing hub and exited 0 after normal close requests. These validate shutdown on that recorded integration; they do not isolate an audio-quality or FPS change.Checklist
e154f565852; focused host-lifetime repair