ruffle-rs / ruffle

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

Choo Choo Puzzles Level 1 Softlock and Other Graphical Issues #11333

Open Rno-1 opened 1 year ago

Rno-1 commented 1 year ago

Describe the bug

http://onemorelevel.com/static/games3/choo-choo.swf This AVM 2 game seems to start up fine, but some text on the main menu looks shifted a bit. After clicking "Play" to bring up the level select, it hangs for a few seconds in the middle of transitioning. The level number is missing and while in a level, the ends of the trains are flat when they should be rounded. When completing the first level, the completion dialog doesn't appear, softlocking the player.

Expected behavior

There shouldn't be any hangs or graphical oddities. This YouTube video demontrates what the level completion dialog should look like. https://www.youtube.com/watch?v=ZiM5NIpPIMI

Affected platform

Desktop app

Operating system

Windows 10

Browser

No response

Additional information

Running the desktop version of Nightly 2023_06_01. This bug is also in the latest Firefox add-on store.

n0samu commented 1 year ago

The softlock is caused by the game trying to save data:

ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::globals::flash::net::shared_object: SharedObject::get_local: Movie was None
ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x18326eea728 }) to handler FunctionObject(FunctionObject { ptr: 0x1832b3e0fa8 }) : TypeError: Error #1009: Cannot access a property or method of a null object reference. (accessing field: setProperty)
        at Save::GameProgressData/SaveData()
        at Save::GameProgressData/WriteLevelData()
        at Game::Gameplay/Step()
        at GameStates::StateManager/Step()
        at Main/Step()

This is the same problem as https://github.com/ruffle-rs/ruffle/issues/10074#issuecomment-1504361281.

Also, the NotDoppler intro sound continuously loops, which is very annoying. This is a mixed-avm issue (the intro is embedded as an AVM1 SWF)

n0samu commented 1 year ago

The softlock has been fixed by #12885.