ruffle-rs / ruffle

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

Jet Velocity: Cannot start game #10639

Closed n0samu closed 1 year ago

n0samu commented 1 year ago

Describe the bug

Link to SWF: https://uploads.ungrounded.net/553000/553350_jet_velocity_viral.swf

After the loading screen, Jet Velocity shows nothing but a black screen.

In the current version of Ruffle, the game is blocked by XML.hasComplexContent being unimplemented. With #10638, the error no longer occurs, but the game still doesn't load.

Expected behavior

The game should load.

Note: when testing in the Flash projector, you'll need to load the game via the provided SWF URL (File => Open, then paste the URL). Due to Flash's security restrictions, the game doesn't load locally.

Affected platform

Desktop app

Operating system

Windows 10

Browser

No response

Additional information

Here is a decrypted version of the game with some trace statements added: jetvelocity_trace.zip

I recommend loading the game via a local web server so you can compare the trace output with the debug Flash projector.

Notice that both Flash and Ruffle trace "loading image bytes" many times, but only Flash ever traces "onLoaderComplete start!" The relevant function is onZipComplete in com.devm.util.misc.BitmapZipDispenser.

(_loc8_ = new Loader()).name = _loc5_.filename;
_loc8_.loadBytes(_loc5_.content);
_loc8_.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderComplete,false,0,true);

The COMPLETE event of the Loader is never dispatched. I think this may have the same cause as #10463.

n0samu commented 1 year ago

Progressed by #10638, #11045, and #11084. With all of those merged in, the main menu background gradient and music load correctly, but that's about it. The new error is:

ERROR run_frame:run_all_phases_avm2: ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "addedToStage", class: flash.events::Event, ptr: 0x13f0bf50df8 }) to handler FunctionObject(FunctionObject { ptr: 0x13f0d061cd8 }) : ReferenceError: Error #1069: Property http://www.collada.org/2005/11/COLLADASchema::asset not found on XML and there is no default value.
        at org.ascollada.core::DaeEntity/getNode()
        at org.ascollada.core::DaeDocument/read()
        at org.ascollada.core::DaeEntity()
        at org.ascollada.core::DaeDocument()
        at org.ascollada.io::DaeReader/loadDocument()
        at org.papervision3d.objects.parsers::DAE/load()
        at com.devm.hover.game.racers.models::RacerBModel()
        at com.devm.hover.game.racers::Racer/createModel()
        at com.devm.hover.game.racers::Racer()
        at com.devm.hover.menu::FakeRaceBg/setRacer()
        at com.devm.hover.menu::MainMenu/onEvent()
        at flash.display::DisplayObjectContainer/flash::display::DisplayObjectContainer::addChild()
        at com.devm.hover::Main/onMenu()
        at com.devm.hover::HoverDispatcher$/onMenu()
        at com.devm.hover::Main/afterIntro()
        at flash.events::EventDispatcher/flash::events::EventDispatcher::dispatchEvent()
        at com.devm.util.fx::DevmIntro/remove()
        at Function/apply()
        at gs::TweenLite/complete()
        at gs::TweenLite/render()
        at gs::TweenLite$/executeAll()
evilpie commented 1 year ago

Amazingly enough this does seem like a legit use of namespaces: param1.collada::[param2][0]. It's just uncommon to actually find that.

n0samu commented 1 year ago

The main menu looks a lot better now: image

Error is still the same though, it's just a visual improvement.

torokati44 commented 1 year ago

Allegedly fixed by https://github.com/ruffle-rs/ruffle/pull/12540.