Skip to content

Conversation

moulins
Copy link
Contributor

@moulins moulins commented Oct 16, 2025

Fixes #21703.

Supersedes #21725, with a more correct approach.

Movies loaded through ImportAssets(2) should not be accessible via AVM1 bytecode (in particular, they don't have an associated AVM1Object); this is enforced by executing any DoInitAction block encountered during preload as if it was in the parent importer movie.

@moulins moulins force-pushed the import-assets-do-init-action branch from 82f0840 to 343fc78 Compare October 16, 2025 20:49
@moulins moulins added A-avm1 Area: AVM1 (ActionScript 1 & 2) T-fix Type: Bug fix (in something that's supposed to work already) labels Oct 16, 2025
@moulins moulins force-pushed the import-assets-do-init-action branch from 343fc78 to de23bae Compare October 16, 2025 20:56
@moulins moulins added the waiting-on-review Waiting on review from a Ruffle team member label Oct 16, 2025
@danielhjacobs
Copy link
Contributor

If this supersedes #21725, I assume it also fixes #21901?

@Dinnerbone
Copy link
Contributor

Does not fix gnash tests :(

# Tests DoInitAction behavior in child movies, both when
# loaded through a `MovieClipLoader` and through `ImportAssets2`.
#
# .swf files where handcrafted using the JPEXS Decompiler and have
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: where -> were

…SwfMovie>`.

This will be needed for executing `DoInitAction` blocks in movies loaded through
`ImportAssets` in the correct context.
@Dinnerbone Dinnerbone enabled auto-merge (rebase) October 17, 2025 18:30
@Dinnerbone Dinnerbone force-pushed the import-assets-do-init-action branch from de23bae to d173961 Compare October 17, 2025 18:30
@Dinnerbone Dinnerbone merged commit 67edb2e into ruffle-rs:master Oct 17, 2025
26 checks passed
@moulins moulins deleted the import-assets-do-init-action branch October 17, 2025 18:54
@moulins
Copy link
Contributor Author

moulins commented Oct 17, 2025

If this supersedes 21725, I assume it also fixes 21901?

It does, yes.

@danielhjacobs danielhjacobs linked an issue Oct 17, 2025 that may be closed by this pull request
@Lord-McSweeney Lord-McSweeney removed the waiting-on-review Waiting on review from a Ruffle team member label Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm1 Area: AVM1 (ActionScript 1 & 2) newsworthy T-fix Type: Bug fix (in something that's supposed to work already)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

regression since nightly 2025-09-17 Error on http://www.mygamesworld.com/game/7279/Cubis_2_-_Morph-Fun.html

5 participants