Skip to content

MilesAudio: Protect access to playing audio lists with a mutex - #111

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/milesaudiomutex
Open

MilesAudio: Protect access to playing audio lists with a mutex#111
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/milesaudiomutex

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Nov 5, 2025

Copy link
Copy Markdown

Fixes CLIENT-RH. The issue was that: Miles Audio System callback thread accesses a freed AudioEventRTS object during file localization lookup, causing a Use-After-Free crash in std::_Hash due to lack of synchronization with the main thread's audio cleanup loop.

  • Added a mutex to protect access to the m_playingSounds, m_playing3DSounds, and m_playingStreams lists.
  • The Miles Audio callback thread and the main game thread can concurrently access these lists, leading to race conditions and crashes.
  • A ScopedMutex class is used to automatically lock and unlock the mutex in various methods that access these lists.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 2448566

Not quite right? Click here to continue debugging with Seer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants