bevyengine / bevyengine/bevy

`examples/ui/relative_cursor_position.rs` crashes if window is shrunk

Open
#15,661 5 comments 0 reactions 1 assignee Claimed by @BenjaminBrienen View on GitHub
A-UI A-Windowing C-Bug S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

v0.14.2

## \[Optional\] Relevant system information

OS: Windows 11

```
AdapterInfo { name: "AMD Radeon RX 6600", vendor: 4098, device: 29695, device_type: DiscreteGpu, driver: "AMD proprietary driver", driver_info: "23.10.2 (AMD proprietary shader compiler)", backend: Vulkan }
```

## What you did

Run the example `relative_cursor_position`.

## What went wrong

If the window is shrunk small enough, it crashes.

## Additional information

```
ERROR wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default
thread '' panicked at C:\dev\rust\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.20.1\src\backend\wgpu_core.rs:2996:5:
wgpu error: Validation Error

Caused by:
In a RenderPass
note: encoder = ``
In a set_viewport command
Viewport has invalid rect Rect { x: 200.0, y: 100.0, w: 600.0, h: 600.0 }; origin and/or size is less than or equal to 0, and/or is not contained in the render target (1280, 625, 1)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.