title: Segmentation fault when running a python script/GTKBuilder app?
body: <p>I'm trying to learn GUI programming using python2 and GTKBuilder, but  I get a segmentation fault when I run the code. This is my file, created in Glade as a GTKBuilder file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;interface&gt;
    &lt;!-- interface-requires gtk+ 3.0 --&gt;
    &lt;object class="GtkWindow" id="mainWindow"&gt;
      &lt;property name="can_focus"&gt;False&lt;/property&gt;
      &lt;child&gt;
        &lt;object class="GtkBox" id="box1"&gt;
          &lt;property name="visible"&gt;True&lt;/property&gt;
          &lt;property name="can_focus"&gt;False&lt;/property&gt;
          &lt;property name="orientation"&gt;vertical&lt;/property&gt;
          &lt;child&gt;
            &lt;object class="GtkBox" id="box2"&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;False&lt;/property&gt;
              &lt;property name="halign"&gt;start&lt;/property&gt;
              &lt;property name="margin_left"&gt;146&lt;/property&gt;
              &lt;property name="margin_right"&gt;276&lt;/property&gt;
              &lt;child&gt;
                &lt;object class="GtkLabel" id="label1"&gt;
                  &lt;property name="visible"&gt;True&lt;/property&gt;
                  &lt;property name="can_focus"&gt;False&lt;/property&gt;
                  &lt;property name="label" translatable="yes"&gt;label&lt;/property&gt;
                &lt;/object&gt;
                &lt;packing&gt;
                  &lt;property name="expand"&gt;True&lt;/property&gt;
                  &lt;property name="fill"&gt;False&lt;/property&gt;
                  &lt;property name="position"&gt;0&lt;/property&gt;
                &lt;/packing&gt;
              &lt;/child&gt;
              &lt;child&gt;
                &lt;object class="GtkEntry" id="entryName"&gt;
                  &lt;property name="visible"&gt;True&lt;/property&gt;
                  &lt;property name="can_focus"&gt;True&lt;/property&gt;
                  &lt;property name="margin_bottom"&gt;4&lt;/property&gt;
                  &lt;property name="hexpand"&gt;True&lt;/property&gt;
                  &lt;property name="vexpand"&gt;True&lt;/property&gt;
                  &lt;property name="invisible_char"&gt;●&lt;/property&gt;
                  &lt;property name="placeholder_text"&gt;Please enter your name here...&lt;/property&gt;
                &lt;/object&gt;
                &lt;packing&gt;
                  &lt;property name="expand"&gt;True&lt;/property&gt;
                  &lt;property name="fill"&gt;True&lt;/property&gt;
                  &lt;property name="position"&gt;1&lt;/property&gt;
                &lt;/packing&gt;
              &lt;/child&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name="expand"&gt;False&lt;/property&gt;
              &lt;property name="fill"&gt;True&lt;/property&gt;
              &lt;property name="position"&gt;0&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;object class="GtkButton" id="buttonWriteNameToFile"&gt;
              &lt;property name="label" translatable="yes"&gt;button&lt;/property&gt;
              &lt;property name="use_action_appearance"&gt;False&lt;/property&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;True&lt;/property&gt;
              &lt;property name="receives_default"&gt;True&lt;/property&gt;
              &lt;property name="use_action_appearance"&gt;False&lt;/property&gt;
              &lt;signal name="clicked" handler="buttonWriteNameToFile_clicked" swapped="no"/&gt;
            &lt;/object&gt;
            &lt;packing&gt;
              &lt;property name="expand"&gt;False&lt;/property&gt;
              &lt;property name="fill"&gt;True&lt;/property&gt;
              &lt;property name="position"&gt;1&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;placeholder/&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;placeholder/&gt;
          &lt;/child&gt;
        &lt;/object&gt;
      &lt;/child&gt;
    &lt;/object&gt;
  &lt;/interface&gt;
  </code></pre>
  
  <p>My python code, based on <a href="https://stackoverflow.com/questions/2668618/python-glade-could-not-create-gladexml-object">this question</a>, is this:</p>
  
  <pre><code>#!/usr/bin/env python
  
  import gtk
  
  class NameApp:
      def __init__(self):
          filename = "project.glade"
          builder = gtk.Builder()
          builder.add_from_file(filename)
          builder.connect_signals(self)
          builder.get_object("mainWindow").show_all() 
  
      def buttonWriteNameToFile_clicked(self, widget):
          print("File write code...")
  
  if __name__ == "__main__":
      app = NameApp()
      gtk.main()
  </code></pre>
  
  <p>Running the file with <code>python2</code> yields this error:</p>
  
  <pre><code>name.py:9: Warning: cannot create instance of abstract (non-instantiatable) type `GtkBox'
    builder.add_from_file(filename)
  ./geany_run_script.sh: line 5: 14897 Segmentation fault      python2 "name.py"
  </code></pre>
  
  <p>I thought I followed that example as closely as possible, and I don't see any differences outside of the GTKBuilder file. However, the example in the linked question runs successfully on my machine. I don't know if it's relevant, but I'm running Arch Linux x86_64. </p>