ruffle-rs / ruffle

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

Potty Racers 4: Cannot access a property or method of a null object reference. #17248

Open MartySVK opened 4 months ago

MartySVK commented 4 months ago

Describe the bug

The game won't start, I can see only black screen with the error:

ERROR core/src/avm2/events.rs:433 Error dispatching event EventObject(EventObject { type: "complete", class: flash.events::Event, ptr: 0x35fdc88 }) to handler FunctionObject(FunctionObject { ptr: 0x35fef78, name: Ok("ApplicationMain$/preloader_onComplete()") }) : TypeError: Error #1009: Cannot access a property or method of a null object reference.
at haxe.xml::Fast()
at manager::GameManager/loadXML()
at data::InternalXMLData$/loadAndHandleInternalXML()
at framework::GameEngine/loadAndHandleInternalXML()
at framework::GameEngine/gotoMain()
at Main$/main()
at Function/apply()
at ApplicationMain$/begin()
at ApplicationMain$/preloader_onComplete()
at flash.events::EventDispatcher/flash::events::EventDispatcher::dispatchEvent()
at NMEPreloader/onLoaded()
at ApplicationMain$/onEnter()

Expected behavior

start the game

Content Location

Game URL - https://www.gameflare.com/online-game/potty-racers-4/ SWF URL - https://data.gameflare.com/games/3329/Ak0DNghSvSnzn9.swf

Affected platform

Desktop app

Operating system

Windows 11

Browser

No response

Additional information

No response

Lord-McSweeney commented 4 months ago

The data for the XML is stored in a BinaryData tag with character id 2202 (NME_assets_pottyracers_xml). This tag is in frame 2, after the game's code in frame 1. When the code to load the data runs, the ByteArray for the data is not yet initialized with the XML data (the ByteArray is empty).

The game works when running with --load-behavior blocking

SecularSteve commented 4 months ago

While I'm here to report the same exact problem, the predecessor. Potty Racers 3, has it's own set of problems.

Too resource-heavy to run. Won't get past the Gonzo logo without freezing, and thermal-throttling my PC.