Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.67k stars 12.37k forks source link

`zsh: segmentation fault cargo run` with Homebrew installation of Rust #158957

Closed valentinegb closed 8 months ago

valentinegb commented 9 months ago

brew gist-logs <formula> link OR brew config AND brew doctor output

% brew config
HOMEBREW_VERSION: 4.2.2-16-g21a6f93
ORIGIN: https://github.com/Homebrew/brew
HEAD: 21a6f93cc4839377f0bc2a0782181c91ad9643c5
Last commit: 5 hours ago
Core tap JSON: 04 Jan 02:52 UTC
Core cask tap JSON: 04 Jan 02:52 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.3-arm64
CLT: 15.1.0.0.1.1700200546
Xcode: N/A
Rosetta 2: false
% brew doctor
Your system is ready to brew.

Verification

What were you trying to do (and why)?

I am attempting to run specifically my Rust project https://github.com/valentinegb/rubiks-cube-ai with cargo run on a new computer with Rust installed via Homebrew.

What happened (include all command output)?

A window did not open despite being expected and the program ended early with the following output:

% cargo run
   Compiling proc-macro2 v1.0.71
   Compiling unicode-ident v1.0.12
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling serde v1.0.193
   Compiling libc v0.2.151
   Compiling rustc-hash v1.1.0
   Compiling once_cell v1.19.0
   Compiling pin-project-lite v0.2.13
   Compiling equivalent v1.0.1
   Compiling crossbeam-utils v0.8.18
   Compiling version_check v0.9.4
   Compiling thiserror v1.0.52
   Compiling hashbrown v0.14.3
   Compiling tracing-core v0.1.32
   Compiling quote v1.0.33
   Compiling indexmap v2.1.0
   Compiling syn v2.0.43
   Compiling toml_datetime v0.6.5
   Compiling concurrent-queue v2.4.0
   Compiling winnow v0.5.31
   Compiling futures-core v0.3.30
   Compiling getrandom v0.2.11
   Compiling parking v2.2.0
   Compiling memchr v2.7.1
   Compiling event-listener v4.0.1
   Compiling ahash v0.8.6
   Compiling event-listener-strategy v0.4.0
   Compiling zerocopy v0.7.32
   Compiling log v0.4.20
   Compiling allocator-api2 v0.2.16
   Compiling fastrand v2.0.1
   Compiling futures-io v0.3.30
   Compiling event-listener v2.5.3
   Compiling core-foundation-sys v0.8.6
   Compiling async-lock v3.2.0
   Compiling futures-lite v2.1.0
   Compiling slab v0.4.9
   Compiling instant v0.1.12
   Compiling async-task v4.6.0
   Compiling fastrand v1.9.0
   Compiling fixedbitset v0.4.2
   Compiling lazy_static v1.4.0
   Compiling waker-fn v1.1.1
   Compiling futures-lite v1.13.0
   Compiling uuid v1.6.1
   Compiling nonmax v0.5.5
   Compiling async-executor v1.8.0
   Compiling toml_edit v0.20.7
   Compiling async-channel v1.9.0
   Compiling num-traits v0.2.17
   Compiling thread_local v1.1.7
   Compiling smol_str v0.2.0
   Compiling bitflags v1.3.2
   Compiling downcast-rs v1.2.0
   Compiling bevy_ptr v0.12.1
   Compiling bevy_tasks v0.12.1
   Compiling cc v1.0.83
   Compiling libloading v0.7.4
   Compiling core-foundation v0.9.4
   Compiling aho-corasick v1.1.2
   Compiling regex-syntax v0.8.2
   Compiling bevy_macro_utils v0.12.1
   Compiling regex-syntax v0.6.29
   Compiling regex-automata v0.4.3
   Compiling regex v1.10.2
   Compiling regex-automata v0.1.10
   Compiling lock_api v0.4.11
   Compiling overload v0.1.1
   Compiling parking_lot_core v0.9.9
   Compiling nu-ansi-term v0.46.0
   Compiling matchers v0.1.0
   Compiling sharded-slab v0.1.7
   Compiling tracing-log v0.2.0
   Compiling scopeguard v1.2.0
   Compiling core-graphics-types v0.1.3
   Compiling tracing-log v0.1.4
   Compiling objc_exception v0.1.2
   Compiling indexmap v1.9.3
   Compiling raw-window-handle v0.5.2
   Compiling arrayvec v0.7.4
   Compiling byteorder v1.5.0
   Compiling bit-vec v0.6.3
   Compiling unicode-xid v0.2.4
   Compiling paste v1.0.14
   Compiling termcolor v1.4.0
   Compiling unicode-width v0.1.11
   Compiling hashbrown v0.12.3
   Compiling accesskit v0.12.1
   Compiling codespan-reporting v0.11.1
   Compiling pp-rs v0.2.1
   Compiling bit-set v0.5.3
   Compiling malloc_buf v0.0.6
   Compiling crossbeam-channel v0.5.10
   Compiling simd-adler32 v0.3.7
   Compiling khronos-egl v4.1.0
   Compiling crc32fast v1.3.2
   Compiling foreign-types-shared v0.3.1
   Compiling hexf-parse v0.2.1
   Compiling atomic-waker v1.1.2
   Compiling piper v0.2.1
   Compiling objc v0.2.7
   Compiling blake3 v1.5.0
   Compiling async-channel v2.1.1
   Compiling num-integer v0.1.45
   Compiling async-fs v1.6.0
   Compiling adler v1.0.2
   Compiling block v0.1.6
   Compiling miniz_oxide v0.7.1
   Compiling encase_derive_impl v0.6.1
   Compiling async-lock v2.8.0
   Compiling num-rational v0.4.1
   Compiling libloading v0.8.1
   Compiling thiserror-core v1.0.50
   Compiling constant_time_eq v0.3.0
   Compiling base64 v0.21.5
   Compiling static_assertions v1.1.0
   Compiling profiling v1.0.13
   Compiling glow v0.12.3
   Compiling arrayref v0.3.7
   Compiling flate2 v1.0.28
   Compiling fdeflate v0.3.3
   Compiling async-broadcast v0.5.1
   Compiling const_soft_float v0.1.4
   Compiling glob v0.3.1
   Compiling png v0.17.10
   Compiling constgebra v0.1.3
   Compiling clang-sys v1.6.1
   Compiling twox-hash v1.6.3
   Compiling data-encoding v2.5.0
   Compiling color_quant v1.1.0
   Compiling const_panic v0.2.8
   Compiling regex-syntax v0.7.5
   Compiling ktx2 v0.3.0
   Compiling minimal-lexical v0.2.1
   Compiling bindgen v0.69.1
   Compiling nom v7.1.3
   Compiling bitflags v2.4.1
   Compiling shlex v1.2.0
   Compiling peeking_take_while v0.1.2
   Compiling lazycell v1.3.0
   Compiling objc-sys v0.2.0-beta.2
   Compiling cexpr v0.6.0
   Compiling mach2 v0.4.2
   Compiling radsort v0.1.0
   Compiling objc2-encode v2.0.0-pre.2
   Compiling euclid v0.22.9
   Compiling serde_derive v1.0.193
   Compiling thiserror-impl v1.0.52
   Compiling bytemuck_derive v1.5.0
   Compiling tracing-attributes v0.1.27
   Compiling bevy_utils_proc_macros v0.12.1
   Compiling bevy_reflect_derive v0.12.1
   Compiling bevy_ecs_macros v0.12.1
   Compiling bevy_derive v0.12.1
   Compiling bytemuck v1.14.0
   Compiling foreign-types-macros v0.2.3
   Compiling bevy_asset_macros v0.12.1
   Compiling thiserror-core-impl v1.0.50
   Compiling encase_derive v0.6.1
   Compiling foreign-types v0.5.0
   Compiling image v0.24.7
   Compiling bevy_encase_derive v0.12.1
   Compiling tracing v0.1.40
   Compiling blocking v1.5.1
   Compiling bevy_render_macros v0.12.1
   Compiling foreign-types-shared v0.1.1
   Compiling serde_json v1.0.108
   Compiling cfg_aliases v0.1.1
   Compiling io-kit-sys v0.4.0
   Compiling ttf-parser v0.20.0
   Compiling svg_fmt v0.4.1
   Compiling guillotiere v0.6.2
   Compiling winit v0.28.7
   Compiling foreign-types v0.3.2
   Compiling objc2 v0.3.0-beta.3.patch-leaks.3
   Compiling approx v0.5.1
   Compiling slotmap v1.0.7
   Compiling inflections v1.1.1
   Compiling owned_ttf_parser v0.20.0
   Compiling rectangle-pack v0.4.2
   Compiling cpal v0.15.2
   Compiling ryu v1.0.16
   Compiling ruzstd v0.4.0
   Compiling itoa v1.0.10
   Compiling ab_glyph_rasterizer v0.1.8
   Compiling tinyvec_macros v0.1.1
   Compiling tinyvec v1.6.0
   Compiling ab_glyph v0.2.23
   Compiling smallvec v1.11.2
   Compiling glam v0.24.2
   Compiling erased-serde v0.3.31
   Compiling petgraph v0.6.4
   Compiling tracing-subscriber v0.3.18
   Compiling bevy_math v0.12.1
   Compiling naga v0.13.0
   Compiling parking_lot v0.12.1
   Compiling metal v0.26.0
   Compiling bevy_utils v0.12.1
   Compiling bevy_reflect v0.12.1
   Compiling wgpu-types v0.17.0
   Compiling ron v0.8.1
   Compiling bevy_mikktspace v0.12.1
   Compiling hexasphere v9.1.0
   Compiling encase v0.6.1
   Compiling bevy_ecs v0.12.1
   Compiling wgpu-hal v0.17.2
   Compiling naga_oil v0.10.1
   Compiling wgpu-core v0.17.1
   Compiling coreaudio-sys v0.2.14
   Compiling gltf-derive v1.4.0
   Compiling bevy_app v0.12.1
   Compiling bevy_log v0.12.1
   Compiling bevy_core v0.12.1
   Compiling bevy_hierarchy v0.12.1
   Compiling bevy_input v0.12.1
   Compiling bevy_time v0.12.1
   Compiling bevy_a11y v0.12.1
   Compiling bevy_window v0.12.1
   Compiling bevy_transform v0.12.1
   Compiling bevy_asset v0.12.1
   Compiling wgpu v0.17.2
   Compiling bevy_render v0.12.1
   Compiling bevy_core_pipeline v0.12.1
   Compiling bevy_sprite v0.12.1
   Compiling coreaudio-rs v0.11.3
   Compiling core-graphics v0.22.3
   Compiling accesskit_consumer v0.16.1
   Compiling ogg v0.8.0
   Compiling vec_map v0.8.2
   Compiling gilrs v0.10.4
   Compiling dispatch v0.2.0
   Compiling xi-unicode v0.3.0
   Compiling dasp_sample v0.11.0
   Compiling glyph_brush_layout v0.2.3
   Compiling gilrs-core v0.5.10
   Compiling lewton v0.10.2
   Compiling accesskit_macos v0.10.1
   Compiling bevy_pbr v0.12.1
   Compiling gltf-json v1.4.0
   Compiling fnv v1.0.7
   Compiling grid v0.10.0
   Compiling taffy v0.3.18
   Compiling gltf v1.4.0
   Compiling accesskit_winit v0.15.0
   Compiling rodio v0.17.3
   Compiling bevy_text v0.12.1
   Compiling bevy_animation v0.12.1
   Compiling bevy_scene v0.12.1
   Compiling sysinfo v0.29.11
   Compiling percent-encoding v2.3.1
   Compiling base64 v0.13.1
   Compiling bevy_gltf v0.12.1
   Compiling bevy_diagnostic v0.12.1
   Compiling bevy_ui v0.12.1
   Compiling bevy_audio v0.12.1
   Compiling bevy_winit v0.12.1
   Compiling bevy_gilrs v0.12.1
   Compiling bevy_gizmos v0.12.1
   Compiling bevy_internal v0.12.1
   Compiling bevy v0.12.1
   Compiling rubiks_cube_ai v0.1.0 (/Users/valentinebriese/Developer/rubiks-cube-ai)
warning: unused variable: `counterclockwise`
   --> src/rubiks_cube.rs:152:31
    |
152 |     fn rotate_left(&mut self, counterclockwise: bool) {
    |                               ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_counterclockwise`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `counterclockwise`
   --> src/rubiks_cube.rs:156:31
    |
156 |     fn rotate_back(&mut self, counterclockwise: bool) {
    |                               ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_counterclockwise`

warning: unused variable: `counterclockwise`
   --> src/rubiks_cube.rs:160:31
    |
160 |     fn rotate_down(&mut self, counterclockwise: bool) {
    |                               ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_counterclockwise`

warning: constant `START` is never used
 --> src/rubiks_cube.rs:1:7
  |
1 | const START: usize = 0;
  |       ^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: constant `MIDDLE` is never used
 --> src/rubiks_cube.rs:2:7
  |
2 | const MIDDLE: usize = 1;
  |       ^^^^^^

warning: constant `END` is never used
 --> src/rubiks_cube.rs:3:7
  |
3 | const END: usize = 2;
  |       ^^^

warning: multiple associated items are never used
   --> src/rubiks_cube.rs:9:8
    |
8   | impl RubiksCube {
    | --------------- associated items in this implementation
9   |     fn new() -> Self {
    |        ^^^
...
65  |     fn rotate_front(&mut self, counterclockwise: bool) {
    |        ^^^^^^^^^^^^
...
94  |     fn rotate_right(&mut self, counterclockwise: bool) {
    |        ^^^^^^^^^^^^
...
123 |     fn rotate_up(&mut self, counterclockwise: bool) {
    |        ^^^^^^^^^
...
152 |     fn rotate_left(&mut self, counterclockwise: bool) {
    |        ^^^^^^^^^^^
...
156 |     fn rotate_back(&mut self, counterclockwise: bool) {
    |        ^^^^^^^^^^^
...
160 |     fn rotate_down(&mut self, counterclockwise: bool) {
    |        ^^^^^^^^^^^

warning: associated function `new` is never used
   --> src/rubiks_cube.rs:173:8
    |
172 | impl Cubelet {
    | ------------ associated function in this implementation
173 |     fn new(x: Color, y: Color, z: Color) -> Self {
    |        ^^^

warning: multiple variants are never constructed
   --> src/rubiks_cube.rs:180:5
    |
179 | enum Color {
    |      ----- variants in this enum
180 |     Green,
    |     ^^^^^
181 |     Red,
    |     ^^^
182 |     White,
    |     ^^^^^
183 |     Orange,
    |     ^^^^^^
184 |     Blue,
    |     ^^^^
185 |     Yellow,
    |     ^^^^^^
186 |     None,
    |     ^^^^
    |
    = note: `Color` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis

warning: `rubiks_cube_ai` (bin "rubiks_cube_ai") generated 9 warnings (run `cargo fix --bin "rubiks_cube_ai"` to apply 3 suggestions)
    Finished dev [optimized + debuginfo] target(s) in 3m 58s
     Running `target/debug/rubiks_cube_ai`
2024-01-04T03:12:58.388771Z DEBUG bevy_app::plugin_group: added plugin: bevy_core::TaskPoolPlugin
2024-01-04T03:12:58.388868Z DEBUG bevy_app::app: added plugin: bevy_core::TaskPoolPlugin
2024-01-04T03:12:58.389416Z DEBUG bevy_app::plugin_group: added plugin: bevy_core::TypeRegistrationPlugin
2024-01-04T03:12:58.389427Z DEBUG bevy_app::app: added plugin: bevy_core::TypeRegistrationPlugin
2024-01-04T03:12:58.389889Z DEBUG bevy_app::plugin_group: added plugin: bevy_core::FrameCountPlugin
2024-01-04T03:12:58.389896Z DEBUG bevy_app::app: added plugin: bevy_core::FrameCountPlugin
2024-01-04T03:12:58.389904Z DEBUG bevy_app::plugin_group: added plugin: bevy_time::TimePlugin
2024-01-04T03:12:58.389906Z DEBUG bevy_app::app: added plugin: bevy_time::TimePlugin
2024-01-04T03:12:58.390182Z DEBUG bevy_app::plugin_group: added plugin: bevy_transform::TransformPlugin
2024-01-04T03:12:58.390186Z DEBUG bevy_app::app: added plugin: bevy_transform::TransformPlugin
2024-01-04T03:12:58.390433Z DEBUG bevy_app::app: added plugin: bevy_hierarchy::valid_parent_check_plugin::ValidParentCheckPlugin<bevy_transform::components::global_transform::GlobalTransform>
2024-01-04T03:12:58.390508Z DEBUG bevy_app::plugin_group: added plugin: bevy_hierarchy::HierarchyPlugin
2024-01-04T03:12:58.390511Z DEBUG bevy_app::app: added plugin: bevy_hierarchy::HierarchyPlugin
2024-01-04T03:12:58.390689Z DEBUG bevy_app::plugin_group: added plugin: bevy_diagnostic::DiagnosticsPlugin
2024-01-04T03:12:58.390693Z DEBUG bevy_app::app: added plugin: bevy_diagnostic::DiagnosticsPlugin
2024-01-04T03:12:58.390828Z DEBUG bevy_app::plugin_group: added plugin: bevy_input::InputPlugin
2024-01-04T03:12:58.390835Z DEBUG bevy_app::app: added plugin: bevy_input::InputPlugin
2024-01-04T03:12:58.391594Z DEBUG bevy_app::plugin_group: added plugin: bevy_window::WindowPlugin
2024-01-04T03:12:58.391598Z DEBUG bevy_app::app: added plugin: bevy_window::WindowPlugin
2024-01-04T03:12:58.392244Z DEBUG bevy_app::plugin_group: added plugin: bevy_a11y::AccessibilityPlugin
2024-01-04T03:12:58.392248Z DEBUG bevy_app::app: added plugin: bevy_a11y::AccessibilityPlugin
2024-01-04T03:12:58.392268Z DEBUG bevy_app::plugin_group: added plugin: bevy_asset::AssetPlugin
2024-01-04T03:12:58.392270Z DEBUG bevy_app::app: added plugin: bevy_asset::AssetPlugin
2024-01-04T03:12:58.392873Z DEBUG bevy_app::plugin_group: added plugin: bevy_scene::ScenePlugin
2024-01-04T03:12:58.392877Z DEBUG bevy_app::app: added plugin: bevy_scene::ScenePlugin
2024-01-04T03:12:58.393518Z DEBUG bevy_app::plugin_group: added plugin: bevy_winit::WinitPlugin
2024-01-04T03:12:58.393521Z DEBUG bevy_app::app: added plugin: bevy_winit::WinitPlugin
2024-01-04T03:12:58.393813Z DEBUG bevy_app::app: added plugin: bevy_winit::accessibility::AccessibilityPlugin
2024-01-04T03:12:58.481263Z DEBUG bevy_app::plugin_group: added plugin: bevy_render::RenderPlugin
2024-01-04T03:12:58.481279Z DEBUG bevy_app::app: added plugin: bevy_render::RenderPlugin
2024-01-04T03:12:58.490349Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M1", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2024-01-04T03:12:58.492681Z DEBUG bevy_render: Configured wgpu adapter Limits: Limits {
    max_texture_dimension_1d: 16384,
    max_texture_dimension_2d: 16384,
    max_texture_dimension_3d: 2048,
    max_texture_array_layers: 2048,
    max_bind_groups: 8,
    max_bindings_per_bind_group: 65535,
    max_dynamic_uniform_buffers_per_pipeline_layout: 8,
    max_dynamic_storage_buffers_per_pipeline_layout: 4,
    max_sampled_textures_per_shader_stage: 128,
    max_samplers_per_shader_stage: 16,
    max_storage_buffers_per_shader_stage: 31,
    max_storage_textures_per_shader_stage: 128,
    max_uniform_buffers_per_shader_stage: 31,
    max_uniform_buffer_binding_size: 4294967295,
    max_storage_buffer_binding_size: 4294967295,
    max_vertex_buffers: 31,
    max_buffer_size: 4294967296,
    max_vertex_attributes: 31,
    max_vertex_buffer_array_stride: 2048,
    min_uniform_buffer_offset_alignment: 256,
    min_storage_buffer_offset_alignment: 256,
    max_inter_stage_shader_components: 124,
    max_compute_workgroup_storage_size: 32768,
    max_compute_invocations_per_workgroup: 1024,
    max_compute_workgroup_size_x: 1024,
    max_compute_workgroup_size_y: 1024,
    max_compute_workgroup_size_z: 1024,
    max_compute_workgroups_per_dimension: 65535,
    max_push_constant_size: 4096,
}
2024-01-04T03:12:58.492717Z DEBUG bevy_render: Configured wgpu adapter Features: Features(
    DEPTH_CLIP_CONTROL | INDIRECT_FIRST_INSTANCE | SHADER_F16 | RG11B10UFLOAT_RENDERABLE | DEPTH32FLOAT_STENCIL8 | TEXTURE_COMPRESSION_BC | TEXTURE_COMPRESSION_ETC2 | TEXTURE_COMPRESSION_ASTC | TEXTURE_FORMAT_16BIT_NORM | TEXTURE_COMPRESSION_ASTC_HDR | TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | MAPPABLE_PRIMARY_BUFFERS | TEXTURE_BINDING_ARRAY | STORAGE_RESOURCE_BINDING_ARRAY | SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING | UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING | MULTI_DRAW_INDIRECT | PUSH_CONSTANTS | ADDRESS_MODE_CLAMP_TO_ZERO | ADDRESS_MODE_CLAMP_TO_BORDER | POLYGON_MODE_LINE | VERTEX_WRITABLE_STORAGE | CLEAR_TEXTURE | SHADER_PRIMITIVE_INDEX,
)
2024-01-04T03:12:58.492963Z DEBUG bevy_app::app: added plugin: bevy_hierarchy::valid_parent_check_plugin::ValidParentCheckPlugin<bevy_render::view::visibility::InheritedVisibility>
2024-01-04T03:12:58.492970Z DEBUG bevy_app::app: added plugin: bevy_render::view::window::WindowRenderPlugin
2024-01-04T03:12:58.492972Z DEBUG bevy_app::app: added plugin: bevy_render::view::window::screenshot::ScreenshotPlugin
2024-01-04T03:12:58.495721Z DEBUG bevy_app::app: added plugin: bevy_render::camera::CameraPlugin
2024-01-04T03:12:58.495843Z DEBUG bevy_app::app: added plugin: bevy_render::camera::projection::CameraProjectionPlugin<bevy_render::camera::projection::Projection>
2024-01-04T03:12:58.495886Z DEBUG bevy_app::app: added plugin: bevy_render::camera::projection::CameraProjectionPlugin<bevy_render::camera::projection::OrthographicProjection>
2024-01-04T03:12:58.495905Z DEBUG bevy_app::app: added plugin: bevy_render::camera::projection::CameraProjectionPlugin<bevy_render::camera::projection::PerspectiveProjection>
2024-01-04T03:12:58.495922Z DEBUG bevy_app::app: added plugin: bevy_render::extract_resource::ExtractResourcePlugin<bevy_render::camera::manual_texture_view::ManualTextureViews>
2024-01-04T03:12:58.495940Z DEBUG bevy_app::app: added plugin: bevy_render::view::ViewPlugin
2024-01-04T03:12:58.496022Z DEBUG bevy_app::app: added plugin: bevy_render::extract_resource::ExtractResourcePlugin<bevy_render::view::Msaa>
2024-01-04T03:12:58.496027Z DEBUG bevy_app::app: added plugin: bevy_render::view::visibility::VisibilityPlugin
2024-01-04T03:12:58.496075Z DEBUG bevy_app::app: added plugin: bevy_render::mesh::MeshPlugin
2024-01-04T03:12:58.496137Z DEBUG bevy_app::app: added plugin: bevy_render::render_asset::RenderAssetPlugin<bevy_render::mesh::mesh::Mesh, bevy_render::texture::image::Image>
2024-01-04T03:12:58.496143Z DEBUG bevy_app::app: added plugin: bevy_render::globals::GlobalsPlugin
2024-01-04T03:12:58.496193Z DEBUG bevy_app::app: added plugin: bevy_render::mesh::morph::MorphPlugin
2024-01-04T03:12:58.496214Z DEBUG bevy_app::plugin_group: added plugin: bevy_render::texture::ImagePlugin
2024-01-04T03:12:58.496216Z DEBUG bevy_app::app: added plugin: bevy_render::texture::ImagePlugin
2024-01-04T03:12:58.496221Z DEBUG bevy_app::app: added plugin: bevy_render::render_asset::RenderAssetPlugin<bevy_render::texture::image::Image>
2024-01-04T03:12:58.496271Z DEBUG bevy_app::plugin_group: added plugin: bevy_render::pipelined_rendering::PipelinedRenderingPlugin
2024-01-04T03:12:58.496274Z DEBUG bevy_app::app: added plugin: bevy_render::pipelined_rendering::PipelinedRenderingPlugin
2024-01-04T03:12:58.496280Z DEBUG bevy_app::plugin_group: added plugin: bevy_core_pipeline::CorePipelinePlugin
2024-01-04T03:12:58.496282Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::CorePipelinePlugin
2024-01-04T03:12:58.496613Z DEBUG bevy_app::app: added plugin: bevy_render::extract_resource::ExtractResourcePlugin<bevy_core_pipeline::clear_color::ClearColor>
2024-01-04T03:12:58.496736Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::core_2d::Core2dPlugin
2024-01-04T03:12:58.496750Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_core_pipeline::core_2d::camera_2d::Camera2d>
2024-01-04T03:12:58.496961Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::core_3d::Core3dPlugin
2024-01-04T03:12:58.497000Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::skybox::SkyboxPlugin
2024-01-04T03:12:58.497155Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_core_pipeline::skybox::Skybox>
2024-01-04T03:12:58.497162Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_core_pipeline::core_3d::camera_3d::Camera3d>
2024-01-04T03:12:58.497257Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::deferred::copy_lighting_id::CopyDeferredLightingIdPlugin
2024-01-04T03:12:58.497293Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::blit::BlitPlugin
2024-01-04T03:12:58.497316Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::msaa_writeback::MsaaWritebackPlugin
2024-01-04T03:12:58.497322Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::tonemapping::TonemappingPlugin
2024-01-04T03:12:58.518513Z DEBUG bevy_app::app: added plugin: bevy_render::extract_resource::ExtractResourcePlugin<bevy_core_pipeline::tonemapping::TonemappingLuts>
2024-01-04T03:12:58.518570Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_core_pipeline::tonemapping::Tonemapping>
2024-01-04T03:12:58.518575Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_core_pipeline::tonemapping::DebandDither>
2024-01-04T03:12:58.518583Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::upscaling::UpscalingPlugin
2024-01-04T03:12:58.518587Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::bloom::BloomPlugin
2024-01-04T03:12:58.518825Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_core_pipeline::bloom::settings::BloomSettings>
2024-01-04T03:12:58.518829Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::UniformComponentPlugin<bevy_core_pipeline::bloom::downsampling_pipeline::BloomUniforms>
2024-01-04T03:12:58.518854Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::fxaa::FxaaPlugin
2024-01-04T03:12:58.519233Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_core_pipeline::fxaa::Fxaa>
2024-01-04T03:12:58.519258Z DEBUG bevy_app::app: added plugin: bevy_core_pipeline::contrast_adaptive_sharpening::CASPlugin
2024-01-04T03:12:58.519400Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings>
2024-01-04T03:12:58.519404Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::UniformComponentPlugin<bevy_core_pipeline::contrast_adaptive_sharpening::CASUniform>
2024-01-04T03:12:58.519416Z DEBUG bevy_app::plugin_group: added plugin: bevy_sprite::SpritePlugin
2024-01-04T03:12:58.519418Z DEBUG bevy_app::app: added plugin: bevy_sprite::SpritePlugin
2024-01-04T03:12:58.520137Z DEBUG bevy_app::app: added plugin: bevy_sprite::mesh2d::mesh::Mesh2dRenderPlugin
2024-01-04T03:12:58.520354Z DEBUG bevy_app::app: added plugin: bevy_sprite::mesh2d::color_material::ColorMaterialPlugin
2024-01-04T03:12:58.520405Z DEBUG bevy_app::app: added plugin: bevy_sprite::mesh2d::material::Material2dPlugin<bevy_sprite::mesh2d::color_material::ColorMaterial>
2024-01-04T03:12:58.520485Z DEBUG bevy_app::plugin_group: added plugin: bevy_text::TextPlugin
2024-01-04T03:12:58.520487Z DEBUG bevy_app::app: added plugin: bevy_text::TextPlugin
2024-01-04T03:12:58.520989Z DEBUG bevy_app::plugin_group: added plugin: bevy_ui::UiPlugin
2024-01-04T03:12:58.520991Z DEBUG bevy_app::app: added plugin: bevy_ui::UiPlugin
2024-01-04T03:12:58.521039Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_ui::camera_config::UiCameraConfig>
2024-01-04T03:12:58.521679Z DEBUG bevy_app::app: added plugin: bevy_ui::accessibility::AccessibilityPlugin
2024-01-04T03:12:58.521860Z DEBUG bevy_app::plugin_group: added plugin: bevy_pbr::PbrPlugin
2024-01-04T03:12:58.521863Z DEBUG bevy_app::app: added plugin: bevy_pbr::PbrPlugin
2024-01-04T03:12:58.525509Z DEBUG bevy_app::app: added plugin: bevy_pbr::render::mesh::MeshRenderPlugin
2024-01-04T03:12:58.526343Z DEBUG bevy_app::app: added plugin: bevy_pbr::material::MaterialPlugin<bevy_pbr::pbr_material::StandardMaterial>
2024-01-04T03:12:58.526446Z DEBUG bevy_app::app: added plugin: bevy_render::extract_instances::ExtractInstancesPlugin<bevy_asset::id::AssetId<bevy_pbr::pbr_material::StandardMaterial>>
2024-01-04T03:12:58.526562Z DEBUG bevy_app::app: added plugin: bevy_pbr::prepass::PrepassPipelinePlugin<bevy_pbr::pbr_material::StandardMaterial>
2024-01-04T03:12:58.526848Z DEBUG bevy_app::app: added plugin: bevy_pbr::prepass::PrepassPlugin<bevy_pbr::pbr_material::StandardMaterial>
2024-01-04T03:12:58.526878Z DEBUG bevy_app::app: added plugin: bevy_pbr::ssao::ScreenSpaceAmbientOcclusionPlugin
2024-01-04T03:12:58.527426Z DEBUG bevy_app::app: added plugin: bevy_pbr::environment_map::EnvironmentMapPlugin
2024-01-04T03:12:58.527509Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_pbr::environment_map::EnvironmentMapLight>
2024-01-04T03:12:58.527523Z DEBUG bevy_app::app: added plugin: bevy_render::extract_resource::ExtractResourcePlugin<bevy_pbr::light::AmbientLight>
2024-01-04T03:12:58.527525Z DEBUG bevy_app::app: added plugin: bevy_pbr::render::fog::FogPlugin
2024-01-04T03:12:58.527621Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_pbr::fog::FogSettings>
2024-01-04T03:12:58.527626Z DEBUG bevy_app::app: added plugin: bevy_render::extract_resource::ExtractResourcePlugin<bevy_pbr::material::DefaultOpaqueRendererMethod>
2024-01-04T03:12:58.527629Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_pbr::light::ShadowFilteringMethod>
2024-01-04T03:12:58.527705Z DEBUG bevy_app::app: added plugin: bevy_pbr::deferred::DeferredPbrLightingPlugin
2024-01-04T03:12:58.527728Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::ExtractComponentPlugin<bevy_pbr::deferred::PbrDeferredLightingDepthId>
2024-01-04T03:12:58.527731Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::UniformComponentPlugin<bevy_pbr::deferred::PbrDeferredLightingDepthId>
2024-01-04T03:12:58.527847Z DEBUG bevy_app::plugin_group: added plugin: bevy_gltf::GltfPlugin
2024-01-04T03:12:58.527849Z DEBUG bevy_app::app: added plugin: bevy_gltf::GltfPlugin
2024-01-04T03:12:58.528274Z DEBUG bevy_app::plugin_group: added plugin: bevy_audio::AudioPlugin
2024-01-04T03:12:58.528276Z DEBUG bevy_app::app: added plugin: bevy_audio::AudioPlugin
2024-01-04T03:12:58.625570Z DEBUG bevy_app::plugin_group: added plugin: bevy_gilrs::GilrsPlugin
2024-01-04T03:12:58.625583Z DEBUG bevy_app::app: added plugin: bevy_gilrs::GilrsPlugin
2024-01-04T03:12:58.625823Z DEBUG log: Loaded 271 mappings.    
2024-01-04T03:12:58.625934Z DEBUG bevy_app::plugin_group: added plugin: bevy_animation::AnimationPlugin
2024-01-04T03:12:58.625937Z DEBUG bevy_app::app: added plugin: bevy_animation::AnimationPlugin
2024-01-04T03:12:58.626315Z DEBUG bevy_app::plugin_group: added plugin: bevy_gizmos::GizmoPlugin
2024-01-04T03:12:58.626318Z DEBUG bevy_app::app: added plugin: bevy_gizmos::GizmoPlugin
2024-01-04T03:12:58.626550Z DEBUG bevy_app::app: added plugin: bevy_render::extract_component::UniformComponentPlugin<bevy_gizmos::LineGizmoUniform>
2024-01-04T03:12:58.626747Z DEBUG bevy_app::app: added plugin: bevy_render::render_asset::RenderAssetPlugin<bevy_gizmos::LineGizmo>
2024-01-04T03:12:58.626782Z DEBUG bevy_app::app: added plugin: bevy_gizmos::pipeline_2d::LineGizmo2dPlugin
2024-01-04T03:12:58.626819Z DEBUG bevy_app::app: added plugin: bevy_gizmos::pipeline_3d::LineGizmo3dPlugin
zsh: segmentation fault  cargo run

What did you expect to happen?

A window is expected to open displaying a 3D model of a Rubik's Cube and a grey rectangle on the right side. When the window is closed, the program ends normally. When Rust is installed as recommended on the Rust website, this is what happens.

Step-by-step reproduction instructions (by running brew commands)

brew install rust
git clone https://github.com/valentinegb/rubiks-cube-ai.git
cd rubiks-cube-ai
cargo run
alebcay commented 9 months ago

I am able to reproduce the issue with the provided sample project. Runs fine using stable 1.75.0 from rustup.

Here's the backtrace from LLDB when the Homebrew Rust-built binary crashes:

* thread #1, name = 'main', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000187c017f4 libsystem_platform.dylib`_platform_memmove + 420
    frame #1: 0x00000001015257c8 rubiks_cube_ai`_$LT$alloc..string..String$u20$as$u20$core..fmt..Write$GT$::write_str::h575a4f76ab2f0c2c + 64
    frame #2: 0x000000010153ea48 rubiks_cube_ai`core::fmt::write::h81cbefbffc581dab + 420
    frame #3: 0x0000000101526324 rubiks_cube_ai`_$LT$std..panicking..begin_panic_handler..FormatStringPayload$u20$as$u20$core..panic..PanicPayload$GT$::get::h7ae023883a7e8b62 + 60
    frame #4: 0x000000010152645c rubiks_cube_ai`std::panicking::rust_panic_with_hook::h1767d40d669aa9fe + 156
    frame #5: 0x0000000101519980 rubiks_cube_ai`std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::h83ff281d56dc913c + 148
    frame #6: 0x00000001015193a8 rubiks_cube_ai`std::sys_common::backtrace::__rust_end_short_backtrace::h2f399e8aa761a4f1 + 12
    frame #7: 0x00000001015261fc rubiks_cube_ai`rust_begin_unwind + 64
    frame #8: 0x00000001016da9e8 rubiks_cube_ai`core::panicking::panic_fmt::hc32404f2b732859f + 52
    frame #9: 0x00000001016da8d4 rubiks_cube_ai`core::result::unwrap_failed::h2ea3b6e22f1f6a7c + 92
    frame #10: 0x0000000100e30128 rubiks_cube_ai`core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_once::hcdee3163bc86d7ee at result.rs:1077:23 [opt]
    frame #11: 0x0000000100e30104 rubiks_cube_ai`core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_once::hcdee3163bc86d7ee at storage.rs:56:9 [opt]
    frame #12: 0x0000000100e30104 rubiks_cube_ai`core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_once::hcdee3163bc86d7ee at resource.rs:1403:40 [opt]
    frame #13: 0x0000000100e30104 rubiks_cube_ai`core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_once::hcdee3163bc86d7ee(self=<unavailable>, args=<unavailable>) at function.rs:305:13 [opt]
    frame #14: 0x0000000100df9578 rubiks_cube_ai`wgpu_core::device::global::_$LT$impl$u20$wgpu_core..global..Global$LT$G$GT$$GT$::device_create_texture::hfcb0ab75e8f77c6a(self=<unavailable>, device_id=Id<wgpu_core::device::resource::Device<wgpu_hal::empty::Api>> @ x25, desc=<unavailable>, id_in=<unavailable>) at global.rs:597:33 [opt]
    frame #15: 0x0000000100e63334 rubiks_cube_ai`_$LT$wgpu..backend..direct..Context$u20$as$u20$wgpu..context..Context$GT$::device_create_texture::hb01ee5ceaa5fcb76(self=0x00000001360a1010, device=0x000000016fdfb1d0, device_data=0x0000600003eff920, desc=0x000000016fdfb288) at direct.rs:1310:27 [opt]
    frame #16: 0x0000000100e6bf98 rubiks_cube_ai`_$LT$T$u20$as$u20$wgpu..context..DynContext$GT$::device_create_texture::hb6dcd4f9b42467ca(self=0x00000001360a1010, device=<unavailable>, device_data=&(dyn core::any::Any + core::marker::Send + core::marker::Sync) @ 0x00006000012c3c80, desc=0x000000016fdfb288) at context.rs:2349:31 [opt]
    frame #17: 0x0000000100edb5d4 rubiks_cube_ai`_$LT$wgpu..Device$u20$as$u20$wgpu..util..device..DeviceExt$GT$::create_texture_with_data::h737053d29cdc77c8 [inlined] wgpu::Device::create_texture::h5347b6873328c8e9(self=<unavailable>, desc=0x000000016fdfb288) at lib.rs:2455:13 [opt]
    frame #18: 0x0000000100edb5a0 rubiks_cube_ai`_$LT$wgpu..Device$u20$as$u20$wgpu..util..device..DeviceExt$GT$::create_texture_with_data::h737053d29cdc77c8(self=<unavailable>, queue=0x0000600002bdc510, desc=<unavailable>, data=(data_ptr = "\xff\xff\xff\xff", length = 4)) at device.rs:86:23 [opt]
    frame #19: 0x0000000100b39cdc rubiks_cube_ai`bevy_render::texture::fallback_image::fallback_image_new::h999a312718277da8 [inlined] bevy_render::renderer::render_device::RenderDevice::create_texture_with_data::hca2976d4134f1d4d(self=<unavailable>, render_queue=<unavailable>, desc=<unavailable>, data=<unavailable>) at render_device.rs:158:28 [opt]
    frame #20: 0x0000000100b39ccc rubiks_cube_ai`bevy_render::texture::fallback_image::fallback_image_new::h999a312718277da8(render_device=<unavailable>, render_queue=<unavailable>, default_sampler=<unavailable>, format=TextureFormat @ 0x000000016fdfb834, dimension=D3, samples=1, value='\xff') at fallback_image.rs:93:9 [opt]
    frame #21: 0x0000000100b3a130 rubiks_cube_ai`_$LT$bevy_render..texture..fallback_image..FallbackImage$u20$as$u20$bevy_ecs..world..FromWorld$GT$::from_world::h868f99fa5ac5d776(world=<unavailable>) at fallback_image.rs:170:17 [opt]
    frame #22: 0x0000000100b3b224 rubiks_cube_ai`_$LT$bevy_render..texture..ImagePlugin$u20$as$u20$bevy_app..plugin..Plugin$GT$::finish::hb0e5de63c0f9f491 at mod.rs:1053:25 [opt]
    frame #23: 0x0000000100b3b14c rubiks_cube_ai`_$LT$bevy_render..texture..ImagePlugin$u20$as$u20$bevy_app..plugin..Plugin$GT$::finish::hb0e5de63c0f9f491 [inlined] bevy_app::app::App::init_resource::hab75186c0c64d970 at app.rs:570:9 [opt]
    frame #24: 0x0000000100b3b14c rubiks_cube_ai`_$LT$bevy_render..texture..ImagePlugin$u20$as$u20$bevy_app..plugin..Plugin$GT$::finish::hb0e5de63c0f9f491(self=<unavailable>, app=<unavailable>) at mod.rs:144:18 [opt]
    frame #25: 0x00000001014204f0 rubiks_cube_ai`bevy_app::app::App::finish::h4b6214d42fc0503b(self=0x000000016fdfd990) at app.rs:340:13 [opt]
    frame #26: 0x00000001000c8710 rubiks_cube_ai`bevy_winit::winit_runner::h0df546c6bc962b5a(app=App @ 0x000000016fdfd990) at lib.rs:353:9 [opt]
    frame #27: 0x00000001000d0748 rubiks_cube_ai`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h219a897c2111426b [inlined] core::ops::function::FnOnce::call_once::ha3d0930a91c7f479((null)=<unavailable>, (null)=(bevy_app::app::App) @ 0x000000016fdfd990) at function.rs:250:5 [opt]
    frame #28: 0x00000001000d0740 rubiks_cube_ai`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h219a897c2111426b((null)=<unavailable>, (null)=<unavailable>) at function.rs:250:5 [opt]
    frame #29: 0x00000001014203d8 rubiks_cube_ai`bevy_app::app::App::run::h9d45034dd72117bb [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::he96f0e89ace8844e(self=alloc::boxed::Box<(dyn core::ops::function::FnOnce<(bevy_app::app::App), Output=()> + core::marker::Send), alloc::alloc::Global> @ 0x0000600001293c00, args=(bevy_app::app::App) @ 0x000000016fdfe0d0) at boxed.rs:2007:9 [opt]
    frame #30: 0x00000001014203c8 rubiks_cube_ai`bevy_app::app::App::run::h9d45034dd72117bb(self=<unavailable>) at app.rs:314:9 [opt]
    frame #31: 0x000000010001ac24 rubiks_cube_ai`rubiks_cube_ai::main::h7bfc36a028c85149 at main.rs:16:5 [opt]
    frame #32: 0x0000000100003620 rubiks_cube_ai`std::sys_common::backtrace::__rust_begin_short_backtrace::h355a46e49634a754 [inlined] core::ops::function::FnOnce::call_once::hfb0fe7e1e0f038b9((null)=<unavailable>, (null)=<unavailable>) at function.rs:250:5 [opt]
    frame #33: 0x000000010000361c rubiks_cube_ai`std::sys_common::backtrace::__rust_begin_short_backtrace::h355a46e49634a754(f=<unavailable>) at backtrace.rs:154:18 [opt]
    frame #34: 0x00000001000191d8 rubiks_cube_ai`std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h9461ce03e34ff879 at rt.rs:167:18 [opt]
    frame #35: 0x00000001015260e8 rubiks_cube_ai`std::panicking::try::h0f4fc6a6c293a630 + 28
    frame #36: 0x000000010152db38 rubiks_cube_ai`std::rt::lang_start_internal::h87f8a3eec40cef68 + 56
    frame #37: 0x00000001000191bc rubiks_cube_ai`std::rt::lang_start::ha0025e75671b6ebc(main=<unavailable>, argc=<unavailable>, argv=<unavailable>, sigpipe=<unavailable>) at rt.rs:166:17 [opt]
    frame #38: 0x000000010001b9cc rubiks_cube_ai`main + 32
    frame #39: 0x00000001878510e0 dyld`start + 2360

I also got this message to show up once but was unclear whether I built it with brewed Rust or rustup Rust when I got this. Maybe it's related, though.

thread 'main' panicked at /Users/caleb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.17.2/src/backend/direct.rs:3056:5:
wgpu error: Validation Error

Caused by:
    In Device::create_texture
    Texture format Rgba8UnormSrgb can't be used due to missing features
    Features Features(TIMESTAMP_QUERY | INDIRECT_FIRST_INSTANCE | PIPELINE_STATISTICS_QUERY | 0x10) are required but not enabled on the device

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Bo98 commented 9 months ago

Seems like that it's crashing in panic handling - so a crash because of another crash. While that shouldn't happen, that panic noted here nevertheless seems likely to be the initial cause.

cho-m commented 9 months ago

It looks like segfault is impacted by optimization. I don't see a segfault with a standard debug build removing optimization options in Cargo.toml.

More specifically, optimizing wgpu and wgpu-types with opt-level 3 results in segfault.

Rebuilding Homebrew rust with bundled LLVM doesn't segfault. I think the LLVM version should be the same but could be some difference in features.

Bo98 commented 9 months ago

Possible fix might be #159174

valentinegb commented 9 months ago

By the way, it should be noted that rustup-init does not have the same issue, so anyone looking for a workaround while still using Homebrew I would recommend you brew install rustup-init for now.

valentinegb commented 9 months ago

@Bo98 I can confirm that your patch resolves this issue!