Skip to content

core: Set loader to cancelled if target clip is avm1_removed#23620

Open
ChrisCPI wants to merge 1 commit intoruffle-rs:masterfrom
ChrisCPI:fix-avm1-load-cancel
Open

core: Set loader to cancelled if target clip is avm1_removed#23620
ChrisCPI wants to merge 1 commit intoruffle-rs:masterfrom
ChrisCPI:fix-avm1-load-cancel

Conversation

@ChrisCPI
Copy link
Copy Markdown
Contributor

@ChrisCPI ChrisCPI commented May 3, 2026

Description

Fixes #23402

When calling movie_loader and movie_loader_data, it will check if the target clip has been avm1_removed(). If so, then it will set that loader's status to Cancelled and return early, preventing the loaded movie from executing.

Generally, movie_loader will detect if the clip was removed when it was removed immediately after trying to load a movie into it. Otherwise, movie_loader_data will detect it if the clip was removed in-between the time when the load started and when it finished.

Testing

3 new tests have been added, but only avm1/load_cancel_via_removemovieclip is passing. There is likely some underlying issue with unloadMovie and MovieClipLoader.unloadClip that is causing the other two to fail.

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

@ChrisCPI ChrisCPI force-pushed the fix-avm1-load-cancel branch 3 times, most recently from 63dbf21 to 630fcc6 Compare May 8, 2026 02:13
Partially fixes an issue where starting a movie load on an MC, then removing that MC before the load is finished, will still run the loaded movie when it finishes.
@ChrisCPI ChrisCPI force-pushed the fix-avm1-load-cancel branch from 630fcc6 to 12ad201 Compare May 8, 2026 02:16
@ChrisCPI ChrisCPI changed the title core: Remove loader from load manager if target clip is avm1_removed core: Set loader to cancelled if target clip is avm1_removed May 8, 2026
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.

A loaded AVM1 movie will still run even after target clip has been removed

1 participant