Skip to content

gamepad_viewer example broken when a controller is connected #15832

Closed
@NiseVoid

Description

@NiseVoid

Bevy version

11d1ebe

Relevant system information

  • Running Linux, happens on both wayland and X11 (trough xwayland).

What you did

With a controller connected run:

cargo run --example gamepad_viewer

When no controller is connected it starts correctly. When multiple controllers are detected it also crashes.

What went wrong

The app immediately exited

Additional information

The console output:

2024-10-10T18:35:28.259319Z  INFO bevy_winit::system: Creating new window "App" (0v1#4294967296)
2024-10-10T18:35:28.270366Z  INFO bevy_input::gamepad: Gamepad 5v1#4294967301 connected.
thread 'Compute Task Pool (15)' panicked at ./crates/bevy_text/src/text_access.rs:278:43:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:74:14
   2: core::panicking::panic
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:148:5
   3: core::option::unwrap_failed
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:2020:5
   4: core::option::Option<T>::unwrap
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:970:21
   5: bevy_text::text_access::TextWriter<R>::text
             at ./crates/bevy_text/src/text_access.rs:278:9
   6: gamepad_viewer::update_connected
             at ./examples/tools/gamepad_viewer.rs:468:6
   7: core::ops::function::FnMut::call_mut

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreC-BugAn unexpected or incorrect behaviorC-ExamplesAn addition or correction to our examplesS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions