Skip to content

Panic in naga/bevy_render: internal error: entered unreachable code on Apple M3 (macOS Sequoia) #22238

@yzjsswk

Description

@yzjsswk

Bevy version and features

  • Bevy version: 0.16.1, 0.17.2, 0.17.3, 0.18.0-rc.1 (Reproduced on all these versions)
  • Features: Default

Relevant system information

  • Rust version: 1.89
  • OS: macOS 15.7.1 Sequoia (Apple M3)
  • Adapter Info:
AdapterInfo { name: "Apple M3", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }

What you did

ran a minimal 3D scene setup

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .run();
}

fn setup(
    mut commands: Commands,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<StandardMaterial>>,
) {
    commands.spawn((
        Mesh3d(meshes.add(Plane3d::default())),
        MeshMaterial3d(materials.add(Color::WHITE)),
    ));
    commands.spawn((
        Camera3d::default(),
        Transform::from_xyz(0.0, 10.0, 0.0).looking_at(Vec3::ZERO, Vec3::NEG_Z),
    ));
}

What went wrong

The application crashes immediately. If I comment out the MeshMaterial3d(materials.add(Color::WHITE)) line, the application runs normally without crashing (though the mesh is not visible or uses default error material). The crash only occurs when a material is assigned to the mesh.

Additional information

log:

2025-12-22T17:33:15.643244Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "macOS 15.7.1 Sequoia", kernel: "24.6.0", cpu: "Apple M3", core_count: "8", memory: "16.0 GiB" }
2025-12-22T17:33:15.732133Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M3", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2025-12-22T17:33:16.230038Z  INFO bevy_render::batching::gpu_preprocessing: GPU preprocessing is fully supported on this device.
2025-12-22T17:33:16.339796Z  INFO bevy_winit::system: Creating new window App (0v1)
thread 'main' panicked at <cargo_registry>/naga-26.0.0/src/back/glsl/mod.rs:1306:44:
internal error: entered unreachable code
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Encountered a panic in system bevy_core_pipeline::upscaling::prepare_view_upscaling_pipelines!

thread 'Compute Task Pool (3)' panicked at <cargo_registry>/bevy_render-0.17.3/src/render_resource/pipeline_cache.rs:663:49:
index out of bounds: the len is 0 but the index is 1
Encountered a panic in system bevy_render::render_resource::pipeline_cache::PipelineCache::process_pipeline_queue_system!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-BugAn unexpected or incorrect behaviorS-Needs-TriageThis issue needs to be labelled

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions