You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Gtk to repeatedly call a function that updates the image to an image with a different resolution causes an InexactError that corrupts the Gtk loop. In order for that behavior to occur one has to scroll (resize) the image in the gui continuously and fast (it takes a few seconds before it crashes). The following example can be used to demonstrate the issue:
using Gtk4, ImageView, Images
function update_image(canvas)
# this is problematic; imshow! or imshow doesn't matter for this demonstration; max calls not necessary just to make sure
imshow(canvas, rand(RGB, max(Int(round((1 + rand()) * 100)), 100), max(Int(round((1 + rand()) * 100)), 100)))
# this is fine
# imshow(canvas, rand(RGB, (100, 100)))
Cint(1)
end
function main()
win = GtkWindow("Awesome window", 1200, 800)
box = GtkBox(:h)
frame, canvas = ImageView.frame_canvas(:auto)
push!(box, frame)
push!(win, box)
imshow(canvas, rand(RGB, (100, 100)))
Gtk4.g_timeout_add(() -> update_image(canvas), 1000)
end
main()
Using Gtk to repeatedly call a function that updates the image to an image with a different resolution causes an InexactError that corrupts the Gtk loop. In order for that behavior to occur one has to scroll (resize) the image in the gui continuously and fast (it takes a few seconds before it crashes). The following example can be used to demonstrate the issue:
The error:
System Info:
Ubuntu 22.04
Julia 1.9.4
Gtk4 v0.5.4
GtkObservables v2.0.3
ImageView v0.12.0
Images v0.26.0
Observables v0.5.5
The text was updated successfully, but these errors were encountered: