ruffle-rs / ruffle

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

Crash on run: 'Surface became unavailable: Timeout', desktop/src/gui/controller.rs:192:14 #12608

Closed byjove01 closed 5 months ago

byjove01 commented 1 year ago

Describe what you were doing

Launching Super Smash Flash 2 with Linux Ruffle client. It crashed during the loading screen.

What does the crash message say?

panicked at 'Surface became unavailable: Timeout', desktop/src/gui/controller.rs:192:14

Ruffle Version

0.1.0-nightly (37085767f643c3bb9c4292b1f999aa36587e0a29 2023-08-06)

Affected platform

Desktop app

Operating system

Arch Linux Rolling Release [64-bit]

Additional information

Filename: run

Render Info

Renderer: wgpu Adapter Backend: Vulkan Adapter Name: "AMD Radeon RX 5700 XT" Adapter Device Type: DiscreteGpu Adapter Driver Name: "AMD open-source driver" Adapter Driver Info: "2023.Q2.3 (LLPC)" Enabled features: Features(TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | PUSH_CONSTANTS) Available features: Features(DEPTH_CLIP_CONTROL | TIMESTAMP_QUERY | INDIRECT_FIRST_INSTANCE | SHADER_F16 | RG11B10UFLOAT_RENDERABLE | DEPTH32FLOAT_STENCIL8 | TEXTURE_COMPRESSION_BC | TEXTURE_FORMAT_16BIT_NORM | PIPELINE_STATISTICS_QUERY | TIMESTAMP_QUERY_INSIDE_PASSES | MAPPABLE_PRIMARY_BUFFERS | TEXTURE_BINDING_ARRAY | BUFFER_BINDING_ARRAY | STORAGE_RESOURCE_BINDING_ARRAY | SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING | UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING | PARTIALLY_BOUND_BINDING_ARRAY | MULTI_DRAW_INDIRECT | MULTI_DRAW_INDIRECT_COUNT | ADDRESS_MODE_CLAMP_TO_ZERO | ADDRESS_MODE_CLAMP_TO_BORDER | POLYGON_MODE_LINE | POLYGON_MODE_POINT | CONSERVATIVE_RASTERIZATION | VERTEX_WRITABLE_STORAGE | CLEAR_TEXTURE | SPIRV_SHADER_PASSTHROUGH | MULTIVIEW | SHADER_F64 | SHADER_I16 | SHADER_PRIMITIVE_INDEX) Current limits: Limits { max_texture_dimension_1d: 16384, max_texture_dimension_2d: 16384, max_texture_dimension_3d: 8192, 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: 32, min_storage_buffer_offset_alignment: 32, 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: low Surface samples: 1 Surface size: Extent3d { width: 800, height: 600, depth_or_array_layers: 1 }

markman12345 commented 1 year ago

you also need to provide a link to the game in question so they can try the bug for themselves

byjove01 commented 1 year ago

Sorry. Here you go: https://www.supersmashflash.com/play/ssf2/downloads/ Then, you get rid of the SSF2 executable and you launch "data/run" with Ruffle.

byjove01 commented 1 year ago

https://mega.nz/file/i8lSUK7J#RPJh2xlBS2AsSPm5DCo6ZXy5hT7lg7QvwMRPQJTVn2Y sigh Here is a copy of my own game folder. You only have to execute the "run_SSF2.sh" bash file. Also, after several tests, it looks like it's related to Ruffle's mouse input system. Any interaction with the window after the startup will create this error.

byjove01 commented 1 year ago

What I got after putting RUST_BACKTRACE on full.

thread 'main' panicked at 'Surface became unavailable: Timeout', desktop/src/gui/controller.rs:198:14
stack backtrace:
0:     0x55751555a191 - <unknown>
1:     0x55751558b37f - <unknown>
2:     0x557515555777 - <unknown>
3:     0x557515559fa5 - <unknown>
4:     0x55751555b743 - <unknown>
5:     0x55751555b4d4 - <unknown>
6:     0x5575145c0241 - <unknown>
7:     0x55751555be3e - <unknown>
8:     0x55751555bbc7 - <unknown>
9:     0x55751555a5f6 - <unknown>
10:     0x55751555b912 - <unknown>
11:     0x55751458b993 - <unknown>
12:     0x55751458be33 - <unknown>
13:     0x557514643bd6 - <unknown>
14:     0x55751459b24d - <unknown>
15:     0x55751463be7d - <unknown>
16:     0x55751463c700 - <unknown>
17:     0x5575145950bf - <unknown>
byjove01 commented 11 months ago

Still no answer? No matter what version of Ruffle I download, the same bug occurs.

torokati44 commented 11 months ago

Sorry for the delay!

I generally found the community-made drivers (Mesa+amdgpu+radeonsi+RADV to be better than what AMD itself provides (open-source or not). You could maybe try switching to that.

If you find that too risky, or don't want to do it for other reasons, you could also try running Ruffle by compiling it from source. It's really not that bad, thanks to Cargo. That way, we'll have something meaningful in the stack trace - since the prebuilt releses don't have debug info in them.

byjove01 commented 11 months ago

Oof, I thought you all abandoned me. I just finished to build Ruffle so you just have to tell me what command to add to get the debug info. About the drivers, I'm using mesa yet and I had to drop amdgpu for reasons I don't remember.

torokati44 commented 11 months ago

Oof, I thought you all abandoned me.

Well, it's just that we're so few, and the issues so many... o.o

I just finished to build Ruffle ... I'm using mesa yet and I had to drop amdgpu

Huh, and it still doesn't work?

what command to add to get the debug info.

It should be there already, unless you added --release to cargo build or cargo run.

byjove01 commented 11 months ago

Oh nevermind, I was just using the AUR package to auto-build the repo. I'll build it manually now.

byjove01 commented 11 months ago
Finished dev [unoptimized + debuginfo] target(s) in 0.24s
Running `target/debug/ruffle_desktop`
thread 'main' panicked at desktop/src/gui/controller.rs:200:14:
Surface became unavailable: Timeout
stack backtrace:
0:     0x55bd0efae14c - std::backtrace_rs::backtrace::libunwind::trace::h9245db5fd0d7e680
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1:     0x55bd0efae14c - std::backtrace_rs::backtrace::trace_unsynchronized::h624f54fb29dbfc43
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2:     0x55bd0efae14c - std::sys_common::backtrace::_print_fmt::hfb88496b27156a5a
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:67:5
3:     0x55bd0efae14c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6c0b3f7f9bc4b8b7
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:44:22
4:     0x55bd0efe0f5c - core::fmt::rt::Argument::fmt::h3e96ee0e7b17ec8d
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/rt.rs:138:9
5:     0x55bd0efe0f5c - core::fmt::write::h85b0ce3f83162e11
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/mod.rs:1114:21
6:     0x55bd0efa940d - std::io::Write::write_fmt::h152dbd0798b1b3eb
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/io/mod.rs:1763:15
7:     0x55bd0efadf35 - std::sys_common::backtrace::_print::h1f8aed4cbcc8f3bc
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:47:5
8:     0x55bd0efadf35 - std::sys_common::backtrace::print::haa203cd064f94fbc
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:34:9
9:     0x55bd0efafbd3 - std::panicking::default_hook::{{closure}}::hdc1f7f721040f492
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:272:22
10:     0x55bd0efaf8f5 - std::panicking::default_hook::h50976d85f34b6658
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:292:9
11:     0x55bd0b2b0be3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h09feb926b1f4eda3
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2021:9
12:     0x55bd0b2d6892 - ruffle_desktop::init::{{closure}}::h98d61db0b124fcae
at /home/byjove/Desktop/ruffle/desktop/src/main.rs:65:9
13:     0x55bd0efb02dd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1a8ef1ab4767ec73
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2021:9
14:     0x55bd0efb02dd - std::panicking::rust_panic_with_hook::h02a4c13a57a6c734
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:735:13
15:     0x55bd0efb0051 - std::panicking::begin_panic_handler::{{closure}}::h3c90678ce772ed53
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:609:13
16:     0x55bd0efae686 - std::sys_common::backtrace::__rust_end_short_backtrace::h0d9a930283862c34
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:170:18
17:     0x55bd0efafda2 - rust_begin_unwind
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5
18:     0x55bd0b229625 - core::panicking::panic_fmt::h558a2a17dc326aef
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14
19:     0x55bd0b229bf3 - core::result::unwrap_failed::h45f838e5f12b58cc
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/result.rs:1652:5
20:     0x55bd0b34244c - core::result::Result<T,E>::expect::h4e82297bc2fa695b
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/result.rs:1034:23
21:     0x55bd0b377dc8 - ruffle_desktop::gui::controller::GuiController::render::h618d8d51f5878f0e
at /home/byjove/Desktop/ruffle/desktop/src/gui/controller.rs:197:31
22:     0x55bd0b33d5da - ruffle_desktop::app::App::run::{{closure}}::h6fd998d2ab6f80e8
at /home/byjove/Desktop/ruffle/desktop/src/app.rs:137:29
23:     0x55bd0b285d77 - winit::platform_impl::platform::sticky_exit_callback::h0c9ca88860213c4b
at /home/byjove/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:884:9
24:     0x55bd0b29df2d - winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration::h32ee9d83633fe73f
at /home/byjove/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/x11/mod.rs:375:21
25:     0x55bd0b29e4fb - winit::platform_impl::platform::x11::EventLoop<T>::run_return::h187b07293da3e282
at /home/byjove/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/x11/mod.rs:483:27
26:     0x55bd0b2a099d - winit::platform_impl::platform::x11::EventLoop<T>::run::h7db540a920e40194
at /home/byjove/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/x11/mod.rs:498:25
27:     0x55bd0b285bc1 - winit::platform_impl::platform::EventLoop<T>::run::hdd63eb62177974d0
at /home/byjove/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:792:56
28:     0x55bd0b2a1879 - winit::event_loop::EventLoop<T>::run::h297a8b80a0aa6195
at /home/byjove/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/event_loop.rs:305:9
29:     0x55bd0b32a90c - ruffle_desktop::app::App::run::hd47b3d8b457b131e
at /home/byjove/Desktop/ruffle/desktop/src/app.rs:99:9
30:     0x55bd0b2d7086 - ruffle_desktop::main::{{closure}}::h559ed08def556aca
at /home/byjove/Desktop/ruffle/desktop/src/main.rs:162:33
31:     0x55bd0b341207 - core::result::Result<T,E>::map::h2c92c2fab679b51d
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/result.rs:746:25
32:     0x55bd0b287485 - ruffle_desktop::main::h291c6fc1ab891204
at /home/byjove/Desktop/ruffle/desktop/src/main.rs:162:9
33:     0x55bd0b3ca5db - core::ops::function::FnOnce::call_once::h186d891dd2963b7b
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:250:5
34:     0x55bd0b31774e - std::sys_common::backtrace::__rust_begin_short_backtrace::h0938a3595c122b6a
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:154:18
35:     0x55bd0b3c0b81 - std::rt::lang_start::{{closure}}::h10e31b1c1887ec1c
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:166:18
36:     0x55bd0efa07fb - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h7778dc4a2af1436e
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:284:13
37:     0x55bd0efa07fb - std::panicking::try::do_call::h32994d391bca83e0
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:504:40
38:     0x55bd0efa07fb - std::panicking::try::h97460c3302e88c07
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:468:19
39:     0x55bd0efa07fb - std::panic::catch_unwind::h9d41dabe115020f8
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panic.rs:142:14
40:     0x55bd0efa07fb - std::rt::lang_start_internal::{{closure}}::hf1ebdf4ee565752f
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:148:48
41:     0x55bd0efa07fb - std::panicking::try::do_call::h7d6a7ff2364c8469
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:504:40
42:     0x55bd0efa07fb - std::panicking::try::h8c133f2d8a49e66d
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:468:19
43:     0x55bd0efa07fb - std::panic::catch_unwind::h96752666b6e00c75
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panic.rs:142:14
44:     0x55bd0efa07fb - std::rt::lang_start_internal::h3c6783d2b688a1ee
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:148:20
45:     0x55bd0b3c0b5a - std::rt::lang_start::h98a0924c7cb4a9c0
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:165:17
46:     0x55bd0b28760e - main
47:     0x7fb05c866cd0 - <unknown>
48:     0x7fb05c866d8a - __libc_start_main
49:     0x55bd0b229f05 - _start
50:                0x0 - <unknown>
torokati44 commented 11 months ago

Does it work with -g gl? Does any other Vulkan content work?

byjove01 commented 11 months ago

Does it work with -g gl?

Yes, or at least it does not show the error. I'll make some tests.

Does any other Vulkan content work?

Yep, I use Vulkan with any program I can use it with. It's exclusive to Ruffle.

byjove01 commented 11 months ago

Welp, it seems to work now. But it's slow... I remember the game being way smoother and quick to respond when I got the issue with the previous versions of Ruffle.

torokati44 commented 11 months ago

Welp, it seems to work now.

Great to hear this! :relieved:

But it's slow...

For reasonable performance, you do very much need the --release build flag. :sweat_smile:

byjove01 commented 11 months ago

Damn, I forgot this! Thanks!