ruffle-rs / ruffle

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

Cannot start game - https://www.4399.com/flash/yzzrhj.htm?g=2 #15011

Open wsxarcher opened 10 months ago

wsxarcher commented 10 months ago

Describe the bug

image

Cannot start the game, nothing happens when clicking

ERROR core/src/avm2/events.rs:428 Error dispatching event EventObject(EventObject { type: "addedToStage", class: flash.events::Event, ptr: 0x58f388 }) to handler FunctionObject(FunctionObject { ptr: 0x7323470, name: Ok("src::Main/InitXX()") }) : RustError("A script in this movie has taken too long to execute and has been terminated.")
339.js:1133 WARN core/src/stub.rs:132 Encountered stub: AVM2 flash.display.Loader.unloadAndStop()
339.js:1133 WARN core/src/stub.rs:132 Encountered stub: AVM2 flash.display.Loader.unload()
339.js:1133 INFO web/src/log_adapter.rs:18 __________________--
339.js:1133 INFO web/src/log_adapter.rs:18 ctrl skin load OK !!!!
339.js:1133 INFO web/src/log_adapter.rs:18 ______________________________________
339.js:1133 INFO web/src/log_adapter.rs:18 __________  wmCtrl start  ____________
339.js:1133 INFO web/src/log_adapter.rs:18 ______________________________________
339.js:1133 INFO web/src/log_adapter.rs:18 _gameInfoStr = 940|580|222061|勇者之刃
339.js:1133 WARN core/src/library.rs:523 Unknown device font "SimSun" (bold: false, italic: false)
339.js:1133 WARN core/src/library.rs:523 Unknown device font "Arial" (bold: true, italic: false)
339.js:1133 INFO web/src/log_adapter.rs:18 doSetStyle----------->100016523
339.js:1133 INFO web/src/log_adapter.rs:18 gameWid = 940
339.js:1133 INFO web/src/log_adapter.rs:18 gameHei = 580
339.js:1133 INFO web/src/log_adapter.rs:18 ************
339.js:1133 INFO web/src/log_adapter.rs:18 当前服务器时间为:2024-01-30 07:29:30
339.js:1133 ERROR core/src/avm2/events.rs:428 Error dispatching event EventObject(EventObject { type: "logsuccess", class: unit4399.events::PayEvent, ptr: 0x9aec390 }) to handler FunctionObject(FunctionObject { ptr: 0x2a51a450, name: Ok("src::Api_4399_All$/onPayEventHandler()") }) : TypeError: Error #1034: Type Coercion failed: cannot convert unit4399.events::PayEvent@00000000000 to unit4399.events.PayEvent. at flash.events::EventDispatcher/flash::events::EventDispatcher::dispatchEvent()    at ctrl4399.proxy::MainProxy/loginRegSucBackFun()   at ctrl4399.proxy::MainProxy/checkUserInfoCompleted()   at unit4399.road.loader::BytesLoader/onCompleted()  at unit4399.road.loader::BytesLoader/__completed()
339.js:1133 INFO web/src/log_adapter.rs:18 服务器那边确认成功--------------
339.js:1133 ERROR core/src/avm2/events.rs:428 Error dispatching event EventObject(EventObject { type: "usePayApi", class: unit4399.events::PayEvent, ptr: 0x9aec960 }) to handler FunctionObject(FunctionObject { ptr: 0x2a51a450, name: Ok("src::Api_4399_All$/onPayEventHandler()") }) : TypeError: Error #1034: Type Coercion failed: cannot convert unit4399.events::PayEvent@00000000000 to unit4399.events.PayEvent.  at flash.events::EventDispatcher/flash::events::EventDispatcher::dispatchEvent()    at ctrl4399.proxy::MainProxy/setPayInfo()   at ctrl4399.proxy::MainProxy/loginRegSucBackFun()   at ctrl4399.proxy::MainProxy/checkUserInfoCompleted()   at unit4399.road.loader::BytesLoader/onCompleted()  at unit4399.road.loader::BytesLoader/__completed()

Expected behavior

Start the game

Content Location

https://www.4399.com/flash/yzzrhj.htm?g=2 Selectable (left) from https://www.4399.com/flash/yzzrhj.htm

Affected platform

Browser's extension

Operating system

Window 11

Browser

Edge/Chrome 120

Additional information

This game is part of a bigger effort to support 4399.com games. There might be other issues with this website, from how it handles Flash checks and many CORS issues. Unfortunately, some games cannot be easily debugged on desktop because the swf download other swf or do requests while logged in.

If Ruffle is not detected try to reload the page multiple times because of the known race condition on the Flash check. To avoid refreshing try this Tampermonkey user script 一键下载 flash 游戏 (greasyfork.org)

To solve these issues refers to previous issues such as:

wsxarcher commented 5 months ago

Now the game can started but it stops loading at 25/27 (with high execution time otherwise it fails)