Skip to content

[audioplayers] Fix crash when disposing players on hot restart - #1194

Open
seungsoo47 wants to merge 1 commit into
flutter-tizen:mainfrom
seungsoo47:upstream-plugins-audioplayers-init-dispose
Open

seungsoo47 wants to merge 1 commit into
flutter-tizen:mainfrom
seungsoo47:upstream-plugins-audioplayers-init-dispose

Conversation

@seungsoo47

Copy link
Copy Markdown
Contributor

The global init handler, which audioplayers calls after a hot restart to dispose stale players, iterated audio_players_ with a range-for while DisposeAudioPlayer() erased the current element. Incrementing the erased iterator is undefined behavior and crashed the app with several players.

Clear the player and event sink maps directly instead, as the upstream Linux and Windows implementations do since
bluefireteam/audioplayers#1905.

The global init handler, which audioplayers calls after a hot restart to
dispose stale players, iterated audio_players_ with a range-for while
DisposeAudioPlayer() erased the current element. Incrementing the erased
iterator is undefined behavior and crashed the app with several players.

Clear the player and event sink maps directly instead, as the upstream
Linux and Windows implementations do since
bluefireteam/audioplayers#1905.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T06:24:24.486914Z 07dad68 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant