Skip to content

Paniced with Pen tablet Input #1516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ptircylinder opened this issue Feb 25, 2021 · 2 comments
Closed

Paniced with Pen tablet Input #1516

ptircylinder opened this issue Feb 25, 2021 · 2 comments
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Bug An unexpected or incorrect behavior P-Crash A sudden unexpected crash

Comments

@ptircylinder
Copy link

ptircylinder commented Feb 25, 2021

Bevy version

0.4.0

What you did

Input with a pen tablet in examples/input/touch_input_event.rs

What you expected to happen

It works.

What actually happened

It paniced if the value of "force" is None.

Additional information

Ad hoc : crates/bevy_input/src/touch.rs#L190

fn process_touch_event(&mut self, event: &TouchInput) {
    if event.force.is_none() {
        return;
    }
    ...
}
@bjorn3 bjorn3 added C-Bug An unexpected or incorrect behavior P-Crash A sudden unexpected crash A-Input Player input via keyboard, mouse, gamepad, and more labels Feb 25, 2021
@ptircylinder ptircylinder changed the title Paniced with Pen tablet Input. Paniced with Pen tablet Input Feb 25, 2021
@mockersf
Copy link
Member

👋

Would you have the line where it panicked? With a quick read of the code, I didn't find where that could happen

@ptircylinder
Copy link
Author

I should have written it here, sorry.

thread 'Compute Task Pool (3)' panicked at 'called `Option::unwrap()` on a `None` value', crates\bevy_input\src\touch.rs:197:74

It panicked when the pen is in midair.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Bug An unexpected or incorrect behavior P-Crash A sudden unexpected crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants