ruffle-rs / ruffle

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

segfault for bad mem allocation on http://web.archive.org/web/20071225015255oe_/http://www.nhncorp.jp/img/common/main.swf #3757

Open Ds886 opened 3 years ago

Ds886 commented 3 years ago

Describe the bug desktop fails to load due to bad mem alloc

Expected behavior memory proeprly allocated

Is the problem with the Ruffle desktop app, extension, or self-hosted version? desktop

What platform are you using? Linux - arch 64 bit

Ds886 commented 3 years ago
[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 (-1077750125)] : Validation Error: [ VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbfc2d693 | vkCreateGraphicsPipelines() pCreateInfo[0]: topology is VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST and primitiveRestartEnable is VK_TRUE. It is invalid. The Vulkan spec states: If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)
    object info: (type: DEVICE, hndl: 93999783648088)

[2021-03-24T07:05:12Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (2094043421)] : Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x557e07b69b58, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (800,600), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1018,439), minImageExtent = (1018,439), maxImageExtent = (1018,439). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
    object info: (type: DEVICE, hndl: 93999783648088)

thread '<unnamed>' panicked at 'attempt to multiply with overflow', /home/dash/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.2/src/host/alsa/mod.rs:760:23
stack backtrace:
   0:     0x557e05ff27f0 - std::backtrace_rs::backtrace::libunwind::trace::hc8b42b9686bc0d07
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x557e05ff27f0 - std::backtrace_rs::backtrace::trace_unsynchronized::h839b1b3e096c7094
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x557e05ff27f0 - std::sys_common::backtrace::_print_fmt::h9f36d7c0c192ca75
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x557e05ff27f0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::haad7d3f8925bad2e
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x557e06017a8c - core::fmt::write::h7239b2f9a99358fb
                               at /build/rust/src/rustc-1.50.0-src/library/core/src/fmt/mod.rs:1078:17
   5:     0x557e05fecab5 - std::io::Write::write_fmt::hf8c959f904cf1571
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/io/mod.rs:1517:15
   6:     0x557e05ff4925 - std::sys_common::backtrace::_print::h2c2d9abbb61e574c
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x557e05ff4925 - std::sys_common::backtrace::print::h1362a4690ddc5737
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x557e05ff4925 - std::panicking::default_hook::{{closure}}::h250793a7822001b5
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/panicking.rs:208:50
   9:     0x557e05ff447a - std::panicking::default_hook::h888581adc5c27c77
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/panicking.rs:225:9
  10:     0x557e05ff50c1 - std::panicking::rust_panic_with_hook::h77f2fa3bf09efb3b
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/panicking.rs:591:17
  11:     0x557e05ff4bd7 - std::panicking::begin_panic_handler::{{closure}}::h3cafa059e2851c7f
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/panicking.rs:495:13
  12:     0x557e05ff2cac - std::sys_common::backtrace::__rust_end_short_backtrace::h46c04e54576d0893
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x557e05ff4b69 - rust_begin_unwind
                               at /build/rust/src/rustc-1.50.0-src/library/std/src/panicking.rs:493:5
  14:     0x557e060147a1 - core::panicking::panic_fmt::hb1f208d1d41afb98
                               at /build/rust/src/rustc-1.50.0-src/library/core/src/panicking.rs:92:14
  15:     0x557e060146ed - core::panicking::panic::h2d79ca19ff17340e
                               at /build/rust/src/rustc-1.50.0-src/library/core/src/panicking.rs:50:5
  16:     0x557e05f8f2a7 - cpal::host::alsa::poll_descriptors_and_prepare_buffer::h1dbefff71ed8526d
                               at /home/dash/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.2/src/host/alsa/mod.rs:760:23
Bale001 commented 3 years ago

This is an issue with cpal, but for reference the bug is here: https://github.com/RustAudio/cpal/blob/fbc0f71e21bb7491797138fe107d27034b3c8e08/src/host/alsa/mod.rs#L760

I think we should open an issue in cpal

Also, does this happen for every SWF you try?

Ds886 commented 3 years ago

Ill try other swf, is there any swf that is more viable for testing?

Ds886 commented 3 years ago

I've tried some sound demos and I see the following

http://edutechwiki.unige.ch/en/Flash_CS3_sound_tutorial http://tecfa.unige.ch/guides/flash/ex/sound-intro/flash-cs3-button-sound.swf

[2021-03-27T12:33:44Z ERROR ruffle_desktop] Unable to create audio device: The requested device is no longer available. For example, it has been unplugged.
[2021-03-27T12:33:44Z ERROR ruffle_core::library] Tried to instantiate non-registered character ID 13
[2021-03-27T12:33:44Z ERROR ruffle_core::display_object::movie_clip] Unable to instantiate display node id 13

I am using pulseaudio if that helps, i do get notification that it is not supported