ruffle-rs / ruffle

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

Railroad Shunting Puzzle 2: Cannot play levels #13116

Open n0samu opened 1 year ago

n0samu commented 1 year ago

Describe the bug

Link to SWF: http://i.notdoppler.com/files/railroadshuntingpuzzle2.swf

After selecting level 1 in Railroad Shunting Puzzle 2, the tutorial is empty. And if you click the "Skip Tutorial" button, the level will be empty too. The game is clearly failing to load its data.

Also, if you wait on the main menu for a few seconds (instead of immediately clicking the Play button), Ruffle will usually freeze. I'm not sure if this problem is related or separate.

Here are the errors from the game after clicking the first Play button:

WARN run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Deserializing class ClassDefinition { name: "GameLevelData", attributes: EnumSet(), static_properties: ["pics", "texts", "sheep", "background", "nodes", "conns", "cars", "scrollLocked"] } is not supported!
ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Tried to deserialize Vector with type name: GameLevelData_PicData
WARN run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Deserializing class ClassDefinition { name: "GameLevelData_PicData", attributes: EnumSet(), static_properties: ["y", "type", "r", "x"] } is not supported!
ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Tried to deserialize Vector with type name: GameLevelData_TextData
ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Tried to deserialize Vector with type name: GameLevelData_SheepData
ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Tried to deserialize Vector with type name: GameLevelData_NodeData
WARN run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Deserializing class ClassDefinition { name: "GameLevelData_NodeData", attributes: EnumSet(), static_properties: ["type", "x", "targetLength", "y", "targetReversed", "targetAngle", "targetType"] } is not supported!
ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Tried to deserialize Vector with type name: GameLevelData_ConnData
ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Tried to deserialize Vector with type name: GameLevelData_CarData
WARN run_frame:run_all_phases_avm2: ruffle_core::avm2::amf: Deserializing class ClassDefinition { name: "GameLevelData_CarData", attributes: EnumSet(), static_properties: ["noCouple1", "pos", "type", "conn", "x", "dir", "y", "id", "noCouple0"] } is not supported!

After clicking the next Play button (on the main menu), this error appears twice:

WARN run_frame:run_all_phases_avm2: ruffle_core::avm2::bytearray: ByteArray.decompress: corrupt deflate stream

More AMF errors also appear. After clicking in the tutorial screen (where it says "click anywhere to continue"), this error appears:

ERROR ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "click", class: flash.events::MouseEvent, ptr: 0x23a879359f0 }) to handler FunctionObject(FunctionObject { ptr: 0x23a8ac4a2a0 }) : RangeError: Display object container has no child with id {index}
        at flash.display::DisplayObjectContainer/flash::display::DisplayObjectContainer::getChildAt()
        at recorder::ActionMove/optimizedPlay()
        at recorder::Player/doAction()
        at TutorialReplay/continueTutorial()
        at TutorialReplay/onClick()

Expected behavior

Levels should be playable.

Affected platform

Desktop app

Operating system

Windows 10

Browser

No response

Additional information

No response

lvyitian commented 1 year ago

I think this will be fixed after https://github.com/ruffle-rs/ruffle/pull/11971 is completed.

n0samu commented 1 year ago

I hope so!

n0samu commented 11 months ago

This is still not fixed by the latest updates to #11971, sadly

n0samu commented 10 months ago

Turns out this was progressed by #11971 along with #13940. This is unfortunately affected by #14206, but when external connections are blocked, the game works perfectly up through the first tutorial level. But the second level fails to load with this error: ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x1f9e602ad30 }) to handler FunctionObject(FunctionObject { ptr: 0x1f9d5de4640 }) : RustError("Error: Invalid object")