Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avm1: Bail out of swapDepths on dead clips #2228

Merged
merged 2 commits into from
Jan 3, 2021

Conversation

Herschel
Copy link
Member

@Herschel Herschel commented Jan 2, 2021

It's possible that swapDepths could be called on a removed clip, i.e. a gotoAndStop followed by a swapDepths on a clip that is not on the new frame. This would futz up the display lists in AVM1 because currently we do not clear the parent assigned for dead clips (so that unload can work), and eventually this causes a panic. Instead, let's bail out of swapDepths if the clip has been removed. This fixes #2163 and others.

This is a somewhat temporary fix until we clean up the related issues with removed AVM1 clips (#993, #1140, #1535). References to these removed clips need to become "invalid", which would more properly solve these issues (trying to call the swapDepths method or otherwise resolve these clips would silently fail).

@Herschel
Copy link
Member Author

Herschel commented Jan 2, 2021

@Toad06 Could you try out this fix on the content that was hitting this panic?

@Herschel Herschel marked this pull request as draft January 2, 2021 13:42
@Toad06
Copy link
Member

Toad06 commented Jan 2, 2021

I confirm these games no longer panic: #1671, #1942, #1991, #2109, #2131, #2163. Most of them work perfectly now.

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.

content error on roulette1.swf Ruffle Error on https://ruffle.rs/demo/
2 participants