linebender / piet

An abstraction for 2D graphics.
Apache License 2.0
1.23k stars 95 forks source link

panic occurred in file 'gradient.rs' at line 408 #556

Closed jm-observer closed 1 year ago

jm-observer commented 1 year ago

I use druid to develop a desktop application, but after using it for a while, it panic, and then I don't know what to do, can you give me some help.

this is my application

xStrom commented 1 year ago

What OS are you using? Windows? Linux? .. and what version?

jm-observer commented 1 year ago

use WIndows, and version is:

druid = { version = "0.8.3", features = ["im", "serde", "svg"] }

piet is v0.6.2

xStrom commented 1 year ago

What Windows version? 7? 8? 10? 11?

Also, I can propose two paths forward here.

  1. You can try to figure out which part of your application triggers the error. If this problem can be reproduced, then I can help look into it. Using it for a while isn't suitable, I just don't have the time. Best if you can provide a single code file that will reproduce it (like Druid examples), but it may also be ok if you can give me specific steps what to do with your full application that will trigger the issue.

  2. You can create a local copy of piet and edit 'gradient.rs' near line 408 to print out debug info on what all the variables of that method are when it panics. The code must not like the value of a specific variable. Then you can use the patch feature of Cargo to force the use of your local piet instead of the global v0.6.2. Finally, you can report back your findings and I can advise.

I suggest you try one (or both) of these paths. If you don't fully understand what I said or how to do it, you can ask a specific question and I will be happy to answer.

jm-observer commented 1 year ago

ok, i will try 2th, because i could not figure out the wrong place.

xStrom commented 1 year ago

Did you figure this out or just move on? I'm asking so that we know if there is a potential Piet bug or not.

jm-observer commented 1 year ago

@xStrom after optimizing the other aspects, this problem did not occur