ruffle-rs / ruffle

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

Does not load - https://www.4399.com/flash/181032_3.htm #16481

Open wsxarcher opened 3 months ago

wsxarcher commented 3 months ago

Describe the bug

Black page with no clear error, just warnings

Loading SWF file commando3.swf
69.js:1049 INFO core\src\context.rs:353 Loaded SWF version 16, resolution 1024x576 @ 60 FPS
69.js:1049 WARN core\src\display_object\movie_clip.rs:4389 register_export asset: Y8_logo (ID: 2)
69.js:1049 WARN core\src\display_object\movie_clip.rs:4408 Exporting asset: Y8_logo (ID: 2)
69.js:1049 WARN core\src\display_object\movie_clip.rs:4389 register_export asset: PreloaderScreen (ID: 18)
69.js:1049 WARN core\src\display_object\movie_clip.rs:4408 Exporting asset: PreloaderScreen (ID: 18)
69.js:1049 WARN core\src\tag_utils.rs:508 Unknown tag code: 255
69.js:1049 WARN core\src\display_object\movie_clip.rs:4359 Registering export for non-movie clip: PF Ronda Seven (ID: 21)
69.js:1049 WARN core\src\display_object\movie_clip.rs:4389 register_export asset: PF Ronda Seven (ID: 21)
69.js:1049 WARN core\src\display_object\movie_clip.rs:4408 Exporting asset: PF Ronda Seven (ID: 21)
69.js:1049 WARN core\src\tag_utils.rs:508 Unknown tag code: 255
69.js:1049 WARN core\src\stub.rs:144 Encountered stub: AVM2 flash.system.Security.allowDomain()
69.js:1049 WARN core\src\stub.rs:144 Encountered stub: AVM2 flash.display.Loader.load() addChild at the correct time
69.js:1049 WARN core\src\library.rs:556 Unknown device font "Times New Roman" (bold: false, italic: false)
69.js:1049 WARN core\src\library.rs:556 Unknown device font "Verdana" (bold: false, italic: false)

Expected behavior

Load the game

Content Location

https://www.4399.com/flash/181032_3.htm

Affected platform

Browser's extension

Operating system

Window 11

Browser

Edge/Chrome 125

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:

0xdr3dd commented 3 months ago

cmd:

.\target\debug\ruffle_desktop.exe D:\ruffle\commando3.swf --spoof-url https://www.4399.com/flash/181032_3.htm --referer "https://www.4399.com/"  --base https://szhong.4399.com/4399swf/upload_swf/ftp19/gamehwq/20161013/16/

swf file : https://szhong.4399.com/4399swf/upload_swf/ftp19/gamehwq/20161013/16/commando3.swf

No specific error:

PS D:\ruffle> 2024-05-30T04:49:44.680097Z  WARN wgpu_hal::vulkan::instance: InstanceFlags::VALIDATION requested, but unable to find layer: VK_LAYER_KHRONOS_validation    
2024-05-30T04:49:44.683725Z  WARN wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
        windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files.    
2024-05-30T04:49:44.683823Z  WARN wgpu_hal::vulkan::instance:   objects: (type: INSTANCE, hndl: 0x19a406446b0, name: ?)    
2024-05-30T04:49:44.731109Z  INFO ruffle_desktop::gui::controller: Using preferred backend Vulkan
2024-05-30T04:49:44.842605Z  INFO ruffle_desktop::gui::controller: Using graphics API vulkan on Quadro P620 (type: DiscreteGpu)
2024-05-30T04:49:44.941446Z  WARN egui_wgpu::renderer: Detected a linear (sRGBA aware) framebuffer Bgra8UnormSrgb. egui prefers Rgba8Unorm or Bgra8Unorm    
2024-05-30T04:49:44.943853Z  INFO ruffle_desktop::gui::controller: loaded cjk fallback font "ArialMT"
2024-05-30T04:49:48.987836Z  INFO ruffle_core::context: Loaded SWF version 16, resolution 1024x576 @ 60 FPS
2024-05-30T04:49:49.639470Z  WARN ruffle_core::tag_utils: Unknown tag code: 255
2024-05-30T04:49:49.658000Z  WARN ruffle_core::tag_utils: Unknown tag code: 255
2024-05-30T04:49:49.789188Z  WARN ruffle_core::stub: Encountered stub: AVM2 flash.system.Security.allowDomain()
2024-05-30T04:49:49.824973Z  WARN ruffle_core::stub: Encountered stub: AVM2 flash.display.Loader.load() addChild at the correct time
2024-05-30T04:49:49.946579Z  INFO ruffle_desktop::backends::ui: Loading device font "TimesNewRomanPSMT" for "Times New Roman" (italic: false, bold: false)
2024-05-30T04:49:49.947665Z  INFO ruffle_core::library: Loaded new device font "Times New Roman" from file
2024-05-30T04:49:49.950776Z  INFO ruffle_desktop::backends::ui: Loading device font "Verdana" for "Verdana" (italic: false, bold: false)
2024-05-30T04:49:49.952433Z  INFO ruffle_core::library: Loaded new device font "Verdana" from file
0xdr3dd commented 3 months ago

i debugged it little bit, while loading some fonts like Verdana, DejaVu Sans it's calling resolve_font in loop (inside func lower_from_text_spans) and it's able to load font it from device. But for other fonts like DejaVu Serif etc if it's not able to find font on device it's setting it default to DefaultFont::Sans. i tried to return default font sans for verdana and DejaVu Sans but it's not working properly.

wsxarcher commented 2 months ago

Now the game loads but the 3d textures are broken (tested on web)

image
torokati44 commented 2 months ago

Might be fixed by #16950 ...?