Open yanshay opened 2 months ago
Thanks for filing a bug.
How big is your screen? What happens here is there is a panic when trying to convert a point from f32 to i16. Maybe the Rectangle is really big (more than 35535 pixel or so?)
My screen is 480x320. Pretty small.
I'm rendering larger coordinates (about twice as high) and animating the y to move from one page to the other. The panic took place sometime during that animation.
The only rectangle that might be special is one that forms a circle using rounded square.
If it's in the conversion of f32 to i16, maybe it's because the f32 somehow contained a NAN?
If it's in the conversion of f32 to i16, maybe it's because the f32 somehow contained a NAN?
That could very well be. Maybe there is a division by zero somewhere.
I got another panic (that already occurred in the past), during the same animation and also seems to be related to rectangle: This one came without any meaningful information in the backtrace. Maybe it's related?
====================== PANIC ======================
panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/i-slint-core-1.8.0/software_renderer/draw_functions.rs:295:51:
called `Result::unwrap()` on an `Err` value: ()
Backtrace:
0x420101b4
0x42024a36
0x4201ba7e
0x420a14c3
0x420ff26e
0x403791a6
The panic in the first post on this thread keeps happening, any ideas what I could change in my app do to avoid it?
There's a comment // FIXME gradients
above that code block and indeed I'm using gradients in my app, maybe I should use gradients without borders and add borders separately?
I also noticed that software_renderer.rs
changed considerably and now the panic in the updated code would be in line 1885. Maybe something in the next release was improved on that front?
Unsupported gradients will just not shown, but shouldn't cause any panic.
It would really help if one could reproduce that reliably so we can fix it.
(I've made commit b0c7ac4 that adds some debug that could help understand more what exactly is going on, So if you can run with the master branch, that would be great.)
It's a large application and it happens every tens of runs after some time it runs so unfortunately I don't know where to begin searching for a reproduction.
I'll try running with the master branch and get back with results once it reoccurs.
The following panic happened once (with many executions), in a relatively large app so can't provide a reproducible scenario or code, so I don't know if this is of value but in case it is:
If any additional information will help to find the root cause let me know.