slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.55k stars 601 forks source link

assertion failed #4873

Closed lifeRobot closed 7 months ago

lifeRobot commented 7 months ago

slint version

1.5.0

panic code

thread 'main' panicked at E:\dev\rust\cargo\registry\src\index.crates.io-6f17d22bba15001f\i-slint-core-1.5.0\properties.rs:183:17:
assertion failed: self.prev.get().is_null() ||
    (*self.prev.get()).get() == self as *const DependencyNode<T>
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

image

describe

  1. I am unable to reproduce this issue and cannot determine where the code is causing painc
  2. This situation happens occasionally, but there is no regular pattern. Sometimes it happens as soon as the program starts, and sometimes it only happens after running for a period of time
  3. Running the program with cargo build --release will also suddenly shut down automatically, but I'm not sure if this issue is causing it
ogoffart commented 7 months ago

Thanks for the bug report. This looks quite serious. It means that some internal Slint data structures are somehow corrupted. Maybe you can try running valgrind if it shows any warning. I can't really help further without a way to reproduce the problem.

ogoffart commented 7 months ago

Based on what can be seen in https://github.com/slint-ui/slint/issues/4888 , I think what happens is probably that the slint data structures gets accessed from different threads in a way that is not supported by non-Send struct.