offline-chess-puzzles icon indicating copy to clipboard operation
offline-chess-puzzles copied to clipboard

Sporadic Index Out of Bounds Error in Main Thread

Open cyrillkuettel opened this issue 5 months ago • 0 comments

The app is encountering an intermittent panic in the main thread due to an index out of bounds error.

thread 'main' panicked at src/main.rs:297:62:
index out of bounds: the len is 6 but the index is 6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at /Users/cyrill/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/macos/app_state.rs:387:33:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }

Heads up: I can't actually reproduce it reliably. It just pops up sometimes. Today it happened 2 times in a row. Could be some weird edge case.

Attempts to reproduce (incomplete)
  • Build latest master. Just `cargo run`
  • My db_puzzles.cv is from Aug 15 2023
  • Set theme="Mate in 3", rating range=2286 and 2500, popularity=96
  • Then the error happened after playing 3-4 puzzles.

cyrillkuettel avatar Sep 06 '24 19:09 cyrillkuettel