slint
slint copied to clipboard
SwipeGestureHandler cause a panic in `timers.rs`
In an app running on MCU (esp32s3) with software-renderer, when adding SwipeGestureHandler it's causing panics to happen, sometimes but not always, when touching the screen, not even when doing any swipes.
When it doesn't panic the swiping work.
It is enough to include the SwipeGestureHandler, even with all swiped disabled, without any code in the swiped callback (and w/o any animation code like there is in the example in the swipe or anywhere else in the app). So it's enough it is there.
I removed all Timers from my slint code and it still happens. And my rust code doesn't use slint timers.
My app is async and it's my event-loop, but that event loop code is working flawlessly for a long time on two applications, including with animations (that probably use timers), and it's working great until the SwipeGestureHandler is introduced.
So it looks to me like it has to do with SwiptGestureHandler timing touch events, but I don't really know.
This is the Backtrace I'm getting:
panicked at /Users/my_user/.cargo/git/checkouts/slint-8153123e5dffa129/746100b/internal/core/timers.rs:257:13:
Recursion in timer code
Backtrace:
0x42060dc6
0x42060dc6 - i_slint_core::platform::update_timers_and_animations
at /Users/my_user/.cargo/git/checkouts/slint-8153123e5dffa129/746100b/internal/core/platform.rs:236
0x420c3d29
0x420c3d29 - <i_slint_core::window::WindowRedrawTracker as i_slint_core::properties::PropertyDirtyHandler>::notify
at /Users/my_user/.cargo/git/checkouts/slint-8153123e5dffa129/746100b/internal/core/window.rs:367
0x420bb9a9
0x420bb9a9 - i_slint_core::properties::mark_dependencies_dirty::{{closure}}
at /Users/my_user/.cargo/git/checkouts/slint-8153123e5dffa129/746100b/internal/core/properties.rs:721
0x420bb9c1
0x420bb9c1 - i_slint_core::properties::dependency_tracker::DependencyListHead<T>::for_each
at /Users/my_user/.cargo/git/checkouts/slint-8153123e5dffa129/746100b/internal/core/properties.rs:195