ruffle-rs / ruffle

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

[tank game] RustError("A script in this movie has taken too long to execute and has been terminated.") #12344

Open olux997 opened 1 year ago

olux997 commented 1 year ago

Describe the bug

ruffle_web-wasm_extensions.js:719 ERROR core/src/avm2/events.rs:419 Error dispatching event EventObject(EventObject { type: "complete", class: flash.events::Event, ptr: 0x13bb9c8 }) to handler FunctionObject(FunctionObject { ptr: 0x10a03e0 }) : RustError("A script in this movie has taken too long to execute and has been terminated.")

Game's SWF tank.zip

P.S This game just can run at [http://] , can't run at [desktop app].... demo: [http://localhost/tank.swf] ....flashplayer can't run direct...

Expected behavior

ruffle_web-wasm_extensions.js:719 ERROR core/src/avm2/events.rs:419 Error dispatching event EventObject(EventObject { type: "complete", class: flash.events::Event, ptr: 0x13bb9c8 }) to handler FunctionObject(FunctionObject { ptr: 0x10a03e0 }) : RustError("A script in this movie has taken too long to execute and has been terminated.")

Affected platform

Self-hosted version Ruffle 2023-07-20

Operating system

Windows 10

Browser

Google Chrome 114.0.5735.199 [64 bits]

Additional information

No response

===================================================

Player Info

Allows script access: true Renderer: wgpu Adapter Backend: Gl Adapter Name: "ANGLE (Intel, Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0, D3D11)" Adapter Device Type: IntegratedGpu Adapter Driver Name: "" Adapter Driver Info: "" Enabled features: Features(TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | PUSH_CONSTANTS) Available features: Features(TEXTURE_COMPRESSION_BC | CLEAR_TEXTURE | MULTIVIEW) Current limits: Limits { max_texture_dimension_1d: 16384, max_texture_dimension_2d: 16384, max_texture_dimension_3d: 2048, max_texture_array_layers: 256, max_bind_groups: 4, max_bindings_per_bind_group: 640, max_dynamic_uniform_buffers_per_pipeline_layout: 8, max_dynamic_storage_buffers_per_pipeline_layout: 0, max_sampled_textures_per_shader_stage: 16, max_samplers_per_shader_stage: 16, max_storage_buffers_per_shader_stage: 0, max_storage_textures_per_shader_stage: 0, max_uniform_buffers_per_shader_stage: 11, max_uniform_buffer_binding_size: 16384, max_storage_buffer_binding_size: 0, max_vertex_buffers: 8, max_buffer_size: 268435456, max_vertex_attributes: 16, max_vertex_buffer_array_stride: 255, min_uniform_buffer_offset_alignment: 256, min_storage_buffer_offset_alignment: 256, max_inter_stage_shader_components: 60, max_compute_workgroup_storage_size: 0, max_compute_invocations_per_workgroup: 0, max_compute_workgroup_size_x: 0, max_compute_workgroup_size_y: 0, max_compute_workgroup_size_z: 0, max_compute_workgroups_per_dimension: 0, max_push_constant_size: 96 } Surface quality: high Surface samples: 4 Surface size: Extent3d { width: 550, height: 400, depth_or_array_layers: 1 }

Page Info

Page URL: http://localhost/@ruffd-tank.htm SWF URL: http://localhost/tank.swf

Browser Info

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

Ruffle Info

Version: 0.1.0 Name: nightly 2023-07-28 Channel: nightly Built: 2023-07-28T00:19:35.903Z Commit: 46d6d6724dc38a658cd9760b2e6ba799bd2028d9 Is extension: false

Metadata

width: 512 height: 480 frameRate: 24 numFrames: 1 swfVersion: 14 backgroundColor: undefined isActionScript3: true uncompressedLength: 1667295

n0samu commented 1 year ago

It seems like the game is going into an infinite loop and using more and more memory. On the desktop app, it eventually fills up all of my RAM without visibly progressing.

olux997 commented 1 year ago

It seems like the game is going into an infinite loop and using more and more memory. On the desktop app, it eventually fills up all of my RAM without visibly progressing.

:This game just can run at [http://] , can't run at [desktop app].... demo: [http://localhost/tank.swf] ....flashplayer can't run direct...

n0samu commented 1 year ago

Yes, I used Ruffle's --dummy-external-interface option to bypass that requirement.

olux997 commented 1 year ago

:

  1. why https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configuration-options [ no --dummy-external-interface option ]
  2. Can work about SWF if use --dummy-external-interface ?
n0samu commented 1 year ago

The Ruffle wiki page only lists web options, not command-line options for the desktop app. I was explaining how I got the game to work in the desktop app. To see all of the command line options, run ruffle --help. Also, the options can be set from the "Open Advanced" menu now as well.

olux997 commented 1 year ago

The Ruffle wiki page only lists web options, not command-line options for the desktop app. I was explaining how I got the game to work in the desktop app. To see all of the command line options, run ruffle --help. Also, the options can be set from the "Open Advanced" menu now as well.

:

  1. I found that the DESKTOP APP version runs much faster than the WEB version
  2. How can I run this game on the Self_host version?
n0samu commented 1 year ago

I shouldn't have said "get the game to work", I just meant "reproduce the bug". The game doesn't work in Ruffle, either on desktop or web.