Skip to content

Minimizing window with 2d camera causes a crash #4526

@opstic

Description

@opstic

Bevy version

Bevy v0.7.0 (crates.io) & v0.8.0-dev (b3e39d0)

Operating system & version

Windows 11 (Build 22000.613)

What you did

  1. New empty project
  2. Add DefaultPlugins and spawn a 2d OrthographicCameraBundle or a UiCameraBundle
  3. Run and minimize the window
  4. CRASH

What you expected to happen

App does not crash

What actually happened

App crashed with view entity should exist: QueryDoesNotMatch(0v0)

Additional information

Example code:

use bevy::prelude::*;
fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_startup_system(setup)
        .run()
}

fn setup(mut commands: Commands) {
    commands.spawn_bundle(OrthographicCameraBundle::new_2d());
}

Full log:

2022-04-18T18:36:44.427341Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) UHD Graphics 620", vendor: 32902, device: 22807, device_type: IntegratedGpu, backend: Dx12 }
thread 'main' panicked at 'view entity should exist: QueryDoesNotMatch(0v0)', C:\Users\User\.cargo\git\checkouts\bevy-f7ffde730c324c74\06d709b\crates\bevy_core_pipeline\src\main_pass_2d.rs:45:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\crash.exe` (exit code: 101)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WindowingPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorO-WindowsSpecific to the Windows desktop operating systemP-RegressionFunctionality that used to work but no longer does. Add a test for this!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions