Is Gtk.jl mature and stable on macOS?

I am trying to determine what GUI toolkit to use in Julia. I want to avoid pursuing a toolkit which is unstable and prone to crashes forcing me to switch toolkit midstream.

I am interested in using Gtk but I know from the past that it has often not been great on macOS. I get simple toy examples to work fine, but I am uncertain about how stable things will be with more complex GUIs. E.g. I have noticed that Glade UI builder which I installed through Homebrew is prone to crashing very easily.

My worry is that this is not merely a Glade problem but an underlying problem with Gtk, which I will hit as well as I build a more complex solution. Can anyone who has used Gtk on macOS verify whether Gtk works well?

If it doesn’t what is the recommended solution which is most mature and stable?

I am including description of my Glade errors. While not related directly to Julia, it may inform you whether this is a general problem with Gtk on Mac or likely Glade specific.

In the console I get this when a crash happens:

$ GladeUI-Message: 16:16:54.601: Glade needs artwork; a default icon will be used for the following classes:
    GtkFileChooserNative    needs an icon named 'widget-gtk-filechoosernative'
    GtkApplicationWindow    needs an icon named 'widget-gtk-applicationwindow'
    GThemedIcon needs an icon named 'widget-gtk-themedicon'
    GFileIcon   needs an icon named 'widget-gtk-fileicon'
    GladeInstantiableGtkBin needs an icon named 'widget-gtk-bin'
GladeUI-Message: 16:16:54.633: No DevHelp installed on your system, devhelp feature will be disabled.
** Message: 16:16:55.237: No TLS support in GIO, Registration & User Survey disabled. (missing glib-networking package)
fish: 'glade &' terminated by signal SIGSEGV (Address boundary error)

While the Apple Problem report dialog gives the following info (I have just extracted what I thought might be useful):

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000001112337d8
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [15386]

VM Regions Near 0x1112337d8:
    CoreAnimation               10d297000-10d434000    [ 1652K] rw-/rwx SM=PRV  
    STACK GUARD              70000291a000-70000291b000 [    4K] ---/rwx SM=NUL  stack guard for thread 1

Thread 0 Crashed:
0   libobjc.A.dylib                 0x00007fff202837a9 0x7fff2027d000 + 26537
1   libgdk-3.0.dylib                0x0000000101146ec0 _gdk_quartz_display_queue_events + 1360
2   libgdk-3.0.dylib                0x000000010114987a gdk_event_dispatch + 26
3   libglib-2.0.0.dylib             0x000000010087603e g_main_context_dispatch + 366
4   libglib-2.0.0.dylib             0x00000001008763bd g_main_context_iterate + 525
5   libglib-2.0.0.dylib             0x0000000100876702 g_main_loop_run + 258
6   libgtk-3.0.dylib                0x0000000100a4b74e gtk_dialog_run + 350
7   glade   

The error message sounds like the installation is missing icons and a library, both problems could be dependent on how the Gtk.jl is installled (-> issue for Gtk.jl and binaryProvider).

This is a homebrew issue not a Gtk.jl issue. Gtk.jl runs fine on OSX. I have that same issue with glade on OSX and therefore usually develop my applications on Linux.

i see. Did you file an issue to brew? (and would it make sense to include a glade into binaryProvider for Gtk.jl?)

And would it make sense to include a glade into binaryProvider for Gtk.jl?

If possible: yes!

1 Like

Thanks, very useful to know. I can use Glade on Linux if I absolutely need to access it then. The rest of the development I can do on Mac.

Anyway I have seen people recommending not using Glade for Gtk4 and writing XML gui files by hand instead. It sure what Gtk version Gtk.jl wraps through.

Gtk3. Gkt4 will come at some point but don’t expect this to be soon.

It’s a matter of taste whether to write the xml files by hand, with glade, or creating the widgets in Julia. I do much with glade since it allows me to move widgets around without changing the code. ImageView on the other hand was written without glade/builder.

1 Like