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: Don't attempt to serialize MovieClips #4637

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

adrian17
Copy link
Collaborator

This fixes the stack overflow in #4631 (after you change locations after getting the crowbar early on)

Note: if there ever was a special case in FP where it did somehow serialize some contents of MovieClips, this will break saving this.
In particular, I haven't tested custom AS classes deriving from MovieClip, as... I don't really know how :( Feel free to block this if you think this needs to be checked first.

@adrian17 adrian17 force-pushed the dont-serialize-movieclips branch from e1b12dd to 9b90b01 Compare June 20, 2021 22:49
@Herschel
Copy link
Member

Looks like this should apply to any display object, and so only needs to check as_stage_object. Did a quick test with a class linked to a clip, and same behavior: it's skipped. MC still gets skipped if you wipe out clip.__proto__, too, so I don't think is_instance_of is the right check there.

(Probably somewhat related to #1513, where AVM1 display objects aren't really objects so much as string paths under the hood.)

@adrian17 adrian17 force-pushed the dont-serialize-movieclips branch from 9b90b01 to 34b03fa Compare June 22, 2021 20:38
@Herschel
Copy link
Member

Thanks!

@Herschel Herschel merged commit 1a132eb into ruffle-rs:master Jun 24, 2021
@adrian17 adrian17 deleted the dont-serialize-movieclips branch June 27, 2021 09:47
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.

2 participants