ruffle-rs / ruffle

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

Error on https://gridclub.com/activities/spin-n-groove #11619

Open BeckyKoz opened 1 year ago

BeckyKoz commented 1 year ago

Error Info

Error name: Error Error message: panicked at 'capacity overflow', library/alloc/src/raw_vec.rs:524:5 Error stack:

Error: panicked at 'capacity overflow', library/alloc/src/raw_vec.rs:524:5
    at U.n.wbg.__wbg_new_d258248ed531ff54 (https://unpkg.com/@ruffle-rs/ruffle/core.ruffle.76e3efb511401f94eb1d.js:1:51306)
    at core::ops::function::FnOnce::call_once{{vtable.shim}}::hcb6f72ebd1a9c8bd (wasm://wasm/02c6e572:wasm-function[8637]:0x83fb82)
    at std::panicking::rust_panic_with_hook::h85b7f6628c291e12 (wasm://wasm/02c6e572:wasm-function[5602]:0x767995)
    at core::panicking::panic_fmt::hf5c4cd929d4aaa9e (wasm://wasm/02c6e572:wasm-function[8501]:0x83b78c)
    at alloc::raw_vec::capacity_overflow::h3bb4537b5f9f8404 (wasm://wasm/02c6e572:wasm-function[8248]:0x834cda)
    at alloc::raw_vec::RawVec<T,A>::reserve_for_push::hb3ebc89fef6fdabc (wasm://wasm/02c6e572:wasm-function[5346]:0x753bc9)
    at alloc::collections::vec_deque::VecDeque<T,A>::grow::h58267e5d4a993593 (wasm://wasm/02c6e572:wasm-function[6262]:0x795b66)
    at <ruffle_core::display_object::movie_clip::MovieClip as ruffle_core::display_object::interactive::TInteractiveObject>::event_dispatch::hddac28da704a22bb (wasm://wasm/02c6e572:wasm-function[1223]:0x3cf297)
    at <ruffle_core::display_object::movie_clip::MovieClip as ruffle_core::display_object::TDisplayObject>::run_frame_avm1::hc921c380c5e81d39 (wasm://wasm/02c6e572:wasm-function[4950]:0x73121a)
    at ruffle_web::Ruffle::tick::h454fc6e5dc8d3cb0 (wasm://wasm/02c6e572:wasm-function[739]:0x26a76c)

Player Info

Allows script access: true Renderer: wgpu Adapter Backend: Gl Adapter Name: "ANGLE (Intel, Intel(R) Iris(R) Xe Graphics 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 } Player type: Object SWF URL: /subscribers/games/music/spinngroove/sng.swf Param base: /subscribers/games/music/spinngroove/ Attribute 0: undefined Attribute 1: undefined Attribute 2: undefined Attribute 3: undefined Attribute 4: undefined Attribute 5: undefined

Page Info

Page URL: https://gridclub.com/activities/spin-n-groove SWF URL: https://gridclub.com/subscribers/games/music/spinngroove/sng.swf

Browser Info

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

Ruffle Info

Version: 0.1.0 Name: nightly 2023-06-18 Channel: nightly Built: 2023-06-18T00:19:35.526Z Commit: 7bbaeb2a61703c919d961ec6624fb531dbc89485 Is extension: false

Metadata

width: 770 height: 318 frameRate: 30 numFrames: 34 swfVersion: 6 backgroundColor: #666666 isActionScript3: false uncompressedLength: 150967

Toad06 commented 1 year ago

This appears to be a regression introduced in commit 0c269ba8ffa924b0a61ade079c417b5881654191.

The current code is here: https://github.com/ruffle-rs/ruffle/blob/700f765f91830358cf9b8ecb8647bb5645a5bb7d/core/src/avm1/runtime.rs#L458-L471

I suppose there is something causing an infinite loop, as adding if i > 10000 { break; } prevents the issue from happening (the file also appears to run without any other particular issue).