Gtk.jl icon indicating copy to clipboard operation
Gtk.jl copied to clipboard

Segfault with showall on trivial glade file on M1 Mac

Open tomerarnon opened this issue 2 years ago • 0 comments

(This may be a duplicate of #676, #201, and/or #161, but I can't tell.)

A segfault occurs when trying to show the window of a trivial glade-defined gui on m1 macbook. Note that this does not occur on an ubuntu 20.04 virtual machine that I have on said mac.

Glade file:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
  <requires lib="gtk+" version="3.12"/>
  <object class="GtkWindow" id="mainWindow">
    <!-- THIS SEEMS TO BE THE BAD SECTION -->
    <child>
      <object class="GtkExpander" id="expander">
      </object>
    </child>
    <!-- THIS SEEMS TO BE THE BAD SECTION -->
  </object>
</interface>

Fresh julia session:

using Gtk
gui = GtkBuilder(filename = "gui.glade")
w = gui["mainWindow"]
showall(w)
signal (11): Segmentation fault: 11
in expression starting at none:0
unknown function (ip: 0x4d5554584d555458)
Allocations: 2130967 (Pool: 2129769; Big: 1198); GC: 1

Note additional strangeness: if I wait several seconds before running the showall command, I can trigger a slightly different error:

As one block:

julia> begin 
       using Gtk
       gui = GtkBuilder(filename = "gui.glade")
       showall(gui["mainWindow"])
       end

signal (11): Segmentation fault: 11
in expression starting at none:0
_cairo_surface_release_source_image at /Users/tarnon/.julia/artifacts/ada2a202928dd4cb2fc4bd18c4efa9d5455ec742/lib/libcairo.2.dylib (unknown line)
DataProviderReleaseCallback at /Users/tarnon/.julia/artifacts/ada2a202928dd4cb2fc4bd18c4efa9d5455ec742/lib/libcairo.2.dylib (unknown line)
data_release_info at /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (unknown line)
Allocations: 2131471 (Pool: 2130265; Big: 1206); GC: 1

As two blocks, with a 10 second delay:

julia> begin 
       using Gtk
       gui = GtkBuilder(filename = "gui.glade")
       w = gui["mainWindow"]
       end;

julia> showall(w)
Assertion failed: (!surface->finished), function _cairo_surface_release_source_image, file cairo-surface.c, line 2092.

signal (6): Abort trap: 6
in expression starting at none:0
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 2131393 (Pool: 2130186; Big: 1207); GC: 1
zsh: abort      julia --project=@Drawing

tomerarnon avatar Feb 13 '23 21:02 tomerarnon