.glade file import issues

Hi everyone,

I’m trying to import a layout file I generated with glade with GtkBuilder, but whenever I do so Julia crashes:(.

Here my script:

using Gtk, LightXML
b = GtkBuilder(filename = "glade_file")

I can’t upload the glade file, so I’ll just copy paste it - hope this works:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
  <requires lib="gtk+" version="3.24"/>
  <object class="GtkApplicationWindow">
    <property name="can-focus">False</property>
    <child>
      <object class="GtkNotebook">
        <property name="visible">True</property>
        <property name="can-focus">True</property>
        <child>
          <object class="GtkBox">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="orientation">vertical</property>
            <child>
              <placeholder/>
            </child>
            <child>
              <placeholder/>
            </child>
          </object>
        </child>
        <child type="tab">
          <object class="GtkLabel" id="settings_tab">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="label" translatable="yes">Settings</property>
          </object>
          <packing>
            <property name="tab-fill">False</property>
          </packing>
        </child>
        <child>
          <object class="GtkNotebook">
            <property name="visible">True</property>
            <property name="can-focus">True</property>
            <property name="tab-pos">left</property>
            <child>
              <placeholder/>
            </child>
            <child type="tab">
              <object class="GtkLabel">
                <property name="visible">True</property>
                <property name="can-focus">False</property>
                <property name="label" translatable="yes">Plot 1</property>
              </object>
              <packing>
                <property name="tab-fill">False</property>
              </packing>
            </child>
            <child>
              <placeholder/>
            </child>
            <child type="tab">
              <object class="GtkLabel">
                <property name="visible">True</property>
                <property name="can-focus">False</property>
                <property name="label" translatable="yes">Plot 2</property>
              </object>
              <packing>
                <property name="position">1</property>
                <property name="tab-fill">False</property>
              </packing>
            </child>
            <child>
              <placeholder/>
            </child>
            <child type="tab">
              <object class="GtkLabel">
                <property name="visible">True</property>
                <property name="can-focus">False</property>
                <property name="label" translatable="yes">Plot 3</property>
              </object>
              <packing>
                <property name="position">2</property>
                <property name="tab-fill">False</property>
              </packing>
            </child>
          </object>
          <packing>
            <property name="position">1</property>
          </packing>
        </child>
        <child type="tab">
          <object class="GtkLabel" id="results_tab">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="label" translatable="yes">Results</property>
          </object>
          <packing>
            <property name="position">1</property>
            <property name="tab-fill">False</property>
          </packing>
        </child>
        <child>
          <placeholder/>
        </child>
        <child type="tab">
          <object class="GtkLabel" id="report_tab">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="label" translatable="yes">Report</property>
          </object>
          <packing>
            <property name="position">2</property>
            <property name="tab-fill">False</property>
          </packing>
        </child>
      </object>
    </child>
  </object>
</interface>

This is so basic, I really don’t get what could be going wrong. I’m using Julia 1.7 on a macOS if that matters.

Thanks for your help!

You might file a bug report at Gtk.jl. Meanwhile, it looks like the crash is in the notebook (an assertion error in gtk_notebook_buildable_add_child), perhaps try a simpler one that doesn’t use it?

I’ll give it a shot, thanks for the tip!