Skip to content

core: Non-root movies that AVM1 loads should always be considered AVM1#23183

Merged
Lord-McSweeney merged 4 commits intoruffle-rs:masterfrom
Lord-McSweeney:force-avm1
Mar 8, 2026
Merged

core: Non-root movies that AVM1 loads should always be considered AVM1#23183
Lord-McSweeney merged 4 commits intoruffle-rs:masterfrom
Lord-McSweeney:force-avm1

Conversation

@Lord-McSweeney
Copy link
Collaborator

@Lord-McSweeney Lord-McSweeney commented Mar 4, 2026

Closes #21007

@Lord-McSweeney Lord-McSweeney added mixed-avm Mixing AVM1 and AVM2 A-core Area: Core player, where no other category fits T-fix Type: Bug fix (in something that's supposed to work already) labels Mar 4, 2026
@kjarosh
Copy link
Member

kjarosh commented Mar 4, 2026

What if AVM2 loads AVM1, which loads AVM2?

@Lord-McSweeney
Copy link
Collaborator Author

Good point, I'll add test coverage for that too

@Lord-McSweeney Lord-McSweeney added the waiting-on-review Waiting on review from a Ruffle team member label Mar 8, 2026
if !self.movie().is_action_script_3() {
match tag_code {
TagCode::DoAbc => tracing::warn!("DoABC tag in AVM1 movie"),
TagCode::DoAbc2 => tracing::warn!("DoABC2 tag in AVM1 movie"),
Copy link
Member

Choose a reason for hiding this comment

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

Should we warn when !is_action_script_3 or !is_declared_action_script_3?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would go with !is_action_script_3, as if AVM1 loads an AVM2 movie the tags will possibly unexpectedly not be executed

Copy link
Member

Choose a reason for hiding this comment

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

Sure, but then the warnings are a bit misleading? They suggest it's an AVM1 movie despite the fact it's declared as AVM2.

@kjarosh
Copy link
Member

kjarosh commented Mar 8, 2026

Just to make sure: when AVM1 loads AVM2, the AVM2 cannot load anything as tags are not executed, right?

Except for the purpose of Do(Init)Action tags, which always look at the version declared in the FileAttributes tag
This makes warning messages when DoABC tags are present in AVM1 movies more consistent
Rename some of the tests to make it more clear what they're doing
Copy link
Member

@kjarosh kjarosh left a comment

Choose a reason for hiding this comment

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

Re-LGTM

@Lord-McSweeney Lord-McSweeney merged commit 426869b into ruffle-rs:master Mar 8, 2026
25 of 26 checks passed
@Lord-McSweeney Lord-McSweeney removed the waiting-on-review Waiting on review from a Ruffle team member label Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core player, where no other category fits mixed-avm Mixing AVM1 and AVM2 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.

Issue with mixed avm

2 participants