ruffle-rs / ruffle

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

Shell Shock - Bird becomes "alarm bell" after first level #11660

Open desertking opened 1 year ago

desertking commented 1 year ago

Describe the bug

The game seems to work fine but after the first level the bird sounds loops and sounds like alarm bell and the game kinda freezes.

Loading SWF file https://www.spiele-umsonst.de/azad/downloads/flashgames/shellshock!.swf

ERROR core/src/avm2/events.rs:419 Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x12fb4e4 }) to handler FunctionObject(FunctionObject { ptr: 0x176b244 }) : ReferenceError: Error #1065: Variable flash.globalization::NumberFormatter is not defined.

Expected behavior

Proceed after first level.

Affected platform

Online demo

Operating system

All

Browser

All

Additional information

No response

n0samu commented 1 year ago

After stubbing NumberFormatter, the next error is:

INFO avm_trace: ReferenceError: Error #1069: Property local3DToGlobal not found on flash.display.Sprite and there is no default value.
        at com.aceviral.tropicaltrip.menu.levelselect.menu::Billboard/update()
        at com.aceviral.tropicaltrip.menu.levelselect::MapScroll()
        at com.aceviral.tropicaltrip.screens::LevelSelectScreen()
        at com.aceviral.tropicaltrip.ingame::WinMenu/closeClick()
        at com.aceviral.tropicaltrip.ingame::WinMenu/nextClick()
desertking commented 10 months ago

This game is in kinda regression. It worked "better" for some time now it's stuck on the loader again:

ERROR core/src/avm2/events.rs:424 Error dispatching event EventObject(EventObject { type: "addedToStage", class: flash.events::Event, ptr: 0x1aa2900 }) to handler FunctionObject(FunctionObject { ptr: 0x156f0d0 }) : TypeError: Error #1034: Type Coercion failed: cannot convert AS3.vec::Vector.@00000000000 to AS3.vec.Vector..

adrian17 commented 10 months ago

FYI, I can't reproduce it - the SWF loads on the demo page for me.

n0samu commented 10 months ago

The problem happens when loading the game if a save file exists. A lot of games have similar issues due to Ruffle's broken/incomplete AMF serialization/deserialization. This isn't really a regression - it was occurring even in build 2023-07-23.