ruffle-rs / ruffle

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

Glean 2 - Some Error Thrown #10444

Closed desertking closed 1 year ago

desertking commented 1 year ago

Error Info

Error name: Error Error message: panicked at 'internal error: entered unreachable code', core/src/avm2/regexp.rs:411:22 Error stack:

Error: panicked at 'internal error: entered unreachable code', core/src/avm2/regexp.rs:411:22
    at U.n.wbg.__wbg_new_15d3966e9981a196 (https://www.spiele-umsonst.de/ruffle/core.ruffle.95091bc5ed6935790e18.js:1:48013)
    at core::ops::function::FnOnce::call_once{{vtable.shim}}::h837712c2d6f5ba6c (wasm://wasm/02ac062e:wasm-function[8115]:0x7ff932)
    at std::panicking::rust_panic_with_hook::ha23c8ba67d558e34 (wasm://wasm/02ac062e:wasm-function[5404]:0x734e2c)
    at core::panicking::panic_fmt::h573ffd15dee74109 (wasm://wasm/02ac062e:wasm-function[7999]:0x7fab43)
    at core::panicking::panic::hb07ae4df23db8663 (wasm://wasm/02ac062e:wasm-function[7405]:0x7c7647)
    at ruffle_core::avm2::regexp::RegExp::find_utf16_match::haf4e2da3446e3e63 (wasm://wasm/02ac062e:wasm-function[774]:0x29cfe7)
    at ruffle_core::avm2::globals::string::replace::hcd269ccbf5e5f097 (wasm://wasm/02ac062e:wasm-function[944]:0x328417)
    at ruffle_core::avm2::function::Executable::exec::h7b3f7079a4ab3b00 (wasm://wasm/02ac062e:wasm-function[913]:0x30d067)
    at ruffle_core::avm2::object::TObject::call_property::he7cd5fc21f4abb18 (wasm://wasm/02ac062e:wasm-function[1085]:0x370928)
    at <ruffle_core::avm2::object::Object as ruffle_core::avm2::object::TObject>::call_property::h2974edcd7b828c8d (wasm://wasm/02ac062e:wasm-function[2654]:0x5b5b0a)

AVM2 stack:

    at String/replace()
    at glean2v3_fla::MainTimeline/readCsv01()
    at glean2v3_fla::MainTimeline/frame1()

Player Info

Allows script access: false

Page Info

Page URL: https://www.spiele-umsonst.de/viewtopic,p,7871.html#7871 SWF URL: https://www.spiele-umsonst.de/azad/downloads/flashgames/glean2mochi_Unpacked.swf

Browser Info

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Platform: Win32 Has touch support: false

Ruffle Info

Version: 0.1.0 Name: nightly 2023-03-28 Channel: nightly Built: 2023-03-28T00:23:30.870Z Commit: fc4b51b20f3b59aa38d65f4be15fedd93242249f Is extension: false

Metadata

width: 700 height: 550 frameRate: 30 numFrames: 6 swfVersion: 9 backgroundColor: #333333 isActionScript3: true uncompressedLength: 14843360

n0samu commented 1 year ago

Just correcting the typo in the title, the game name is Glean 2

desertking commented 1 year ago

Is this done with the version of 30th March? As I still get the error?

Bale001 commented 1 year ago

Is this done with the version of 30th March? As I still get the error?

Will be fixed in the next release

desertking commented 1 year ago

Now throws a new error after clicking play:

ERROR core/src/loader.rs:834 Error during movie loading: FetchError("Got JS error") ruffle_web-wasm_extensions.js:677 ERROR core/src/display_object/movie_clip.rs:2132 Got "ArgumentError: Error #1063: Argument count mismatch on JetParticle/JetParticle on index 0." when constructing AVM2 side of movie clip of type JetParticle ruffle_web-wasm_extensions.js:677 ERROR core/src/display_object/movie_clip.rs:2132 Got "ArgumentError: Error #1063: Argument count mismatch on RockParticle/RockParticle on index 0." when constructing AVM2 side of movie clip of type RockParticle ruffle_web-wasm_extensions.js:677 ERROR core/src/display_object/movie_clip.rs:2132 Got "ArgumentError: Error #1063: Argument count mismatch on SpitParticle5/SpitParticle5 on index 0." when constructing AVM2 side of movie clip of type SpitParticle5 ruffle_web-wasm_extensions.js:677 ERROR core/src/display_object/movie_clip.rs:2132 Got "ArgumentError: Error #1063: Argument count mismatch on WindParticle/WindParticle on index 0." when constructing AVM2 side of movie clip of type WindParticle

n0samu commented 1 year ago

Strangely this problem only seems to happen in web builds of Ruffle. And the SWF also needs to be loaded from the provided URL. Otherwise the game reaches the main menu, but when clicking the play button there, this error occurs:

ERROR ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "click", class: flash.events::MouseEvent, ptr: 0x24817b8d990 }) to handler FunctionObject(FunctionObject { ptr: 0x248184e08a0 }) : TypeError: Error #1010: A term is undefined and has no properties. (accessing field: 0)
        at glean2v3_fla::MainTimeline/updateUpgradesLevels()
        at glean2v3_fla::MainTimeline/initNewGameData()
        at glean2v3_fla::MainTimeline/main_menu_play_btn_click()