ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.63k stars 808 forks source link

Fire and Ice Elves Vs Aliens // Variable siage is not defined #16024

Open Stefannag opened 6 months ago

Stefannag commented 6 months ago

Describe the bug

The game is stuck at loading:

ERROR core/src/display_object/movie_clip.rs:2251 Got "ReferenceError: Error #1065: Variable siage is not defined." when constructing AVM2 side of movie clip of type Preloader

Expected behavior

To load correctly.

Content Location

Ruffle

Affected platform

Self-hosted version

Operating system

Windows 11

Browser

Google Chrome Version 120.0.6099.200 (Official Build) (64-bit)

Additional information

No response

Lord-McSweeney commented 6 months ago

Interesting, this calls

Object.prototype.siage = stage;
Object.prototype.setPropertyIsEnumerable("siage",false);

in its pre-preloader

Stefannag commented 6 months ago

Interesting, this calls

Object.prototype.siage = stage;
Object.prototype.setPropertyIsEnumerable("siage",false);

in its pre-preloader

Should I try to modify the swf file?

Aaron1011 commented 4 months ago

The following code:

            Object.prototype.myField = 'Hi';
            trace("Has myField:" + this.hasOwnProperty("myField"));
            trace("myField: " + myField);

prints this in Flash Player:

Has myField:false
myField: Hi

In Ruffle, this prints Has myField:false and throws an error. We need to make getlex/FindPropStrict consider the prototype in some way.