JuliaImages / ImageView.jl

Interactive display of images and movies
MIT License
135 stars 34 forks source link

Infinite loop when bars cross in contrast GUI #308

Closed jwahlstrand closed 2 months ago

jwahlstrand commented 2 months ago

Reported on Julia discourse: https://discourse.julialang.org/t/imageview-imshow-crashes-when-playing-with-contrast-values-and-crashing-the-repl/115236

I was able to reproduce it in Julia 1.10 on Linux. The crash is triggered when the minimum and maximum scalebars cross, which results in an infinite loop as an observable update triggers itself over and over. I think that this code used to work (OK, maybe I didn't ever try it for this particular image's element type), so I would guess that the behavior of clamp or Observables.jl changed recently. I have a fix in the works.