Skip to content
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

"assertion left == right failed: Root token is already active" (wgpu 0.18.0) #4630

Closed
mcclure opened this issue Nov 5, 2023 · 0 comments · Fixed by #4635
Closed

"assertion left == right failed: Root token is already active" (wgpu 0.18.0) #4630

mcclure opened this issue Nov 5, 2023 · 0 comments · Fixed by #4635
Labels
type: bug Something isn't working

Comments

@mcclure
Copy link

mcclure commented Nov 5, 2023

After upgrading from wgpu 0.16 to 0.18, my code now prints a panic

assertion `left == right` failed: Root token is already active
  left: 0
 right: 1

followed by a segmentation fault. Here is a full RUST_BACKTRACE

PANIC_BACKTRACE.txt

DETAILS/REPRO

I have a project https://github.com/mcclure/webgpu-tutorial-rs . As the name suggests, it is a (close to finished now) WebGPU tutorial application. It is based on the hello-triangle example and attempts to use as many WebGPU features as possible.

As of two days ago, commit a8e1516 was running wgpu 0.16 and winit 0.29-beta (a very early 0.29 beta, so that it had still the 0.28 API surface). Today, I attempted to upgrade. In commit 50c079e I upgraded to winit 0.29 final (while keeping wgpu fixed at 0.16). This had the effect of making the application segfault at close time (although until it quit the application worked). I do not know whether this segfault was caused by wgpu or winit, although the gdb backtrace had symbols for wgpu_hal but not winit. Before investigating further, I upgraded to wgpu 0.18 in the most recent commit, 9c1b58. This commit 9c1b58 is the one that sees the "left == right" error. The example is run with simple cargo run. Warning: When run successfully, this example has audio which currently may be somewhat loud.

I asked about the message in the Matrix and someone named @Wumpf said this was probably bugworthy.

I am running with Rust 1.73.0 on Ubuntu 23.10 with Wayland and an almost entirely stock desktop environment. I am on a "Lenovo ThinkPad T14 Gen 3" with gpu "AMD Ryzen™ 5 PRO 6650U with Radeon™ Graphics × 12". The failure occurs 100% of the time. I have not tested on other platforms.

Expected vs observed behavior

Because this error occurred after a sloppy upgrade from earlier versions of winit and wgpu, it is likely to me that my code is doing something incorrect. However if so, the error message should be more helpful.

@Wumpf Wumpf added type: bug Something isn't working kind: diagnostics Error message should be better and removed kind: diagnostics Error message should be better labels Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants