JuliaImages / ImageView.jl

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

GLib-GObject-CRITICAL error using ImageView and Gtk4 on Linux #293

Closed mgalenb closed 10 months ago

mgalenb commented 10 months ago

Ive run into this error when using ImageView, Gtk4 on a linux machine:

julia> using ImageView, Gtk4

(julia:514058): GLib-GObject-CRITICAL **: 12:36:36.186: cannot register existing type 'GdkEvent'

(julia:514058): GLib-CRITICAL **: 12:36:36.186: g_once_init_leave: assertion 'result != 0' failed

(julia:514058): GLib-GObject-CRITICAL **: 12:36:36.186: g_type_register_static: assertion 'parent_type > 0' failed

(julia:514058): GLib-CRITICAL **: 12:36:36.186: g_once_init_leave: assertion 'result != 0' failed

the process then hangs and I can't ctrl-C or ctrl-D to exit.

I assume this is related to the move to Gtk4?

mgalenb commented 10 months ago
julia> versioninfo()
Julia Version 1.9.3
Commit bed2cd540a1 (2023-08-24 14:43 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 96 × Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, cascadelake)
  Threads: 1 on 96 virtual cores
Environment:
  LD_LIBRARY_PATH = /usr/local/mdsplus/lib
  JULIA_DIR = /usr/local/julia/julia-1.9
jwahlstrand commented 10 months ago

Whoops, the Gtk4 based version was not yet released, but the README already referenced Gtk4. Sorry about that -- 0.12.0, which uses Gtk4, has now been released.

That error and hang happens when you load GTK3_jll and GTK4_jll at the same time. There are checks in both Gtk.jl and Gtk4.jl that are supposed to throw a useful error message when you try to import both. I will look into why that failed here.