It's not a segfault, it's a g_error() and thus a SIGABRT. This happens in gdk_display_manager_open_display(): It iterates over all available backends, and as there is no $DISPLAY the X.org backend fails. Then it tries the wayland backend but there is no $XDG_RUNTIME_DIR either so it fails as well.
The obvious workaround here is to either run the thing under Xvfb to provide a $DISPLAY, or set $XDG_RUNTIME_DIR to some $(CURDIR)/debian/tmp during package build. But of course in the latter case Gdk won't actually do anything. So if you import Gdk to use it, I'd rather recommend xvfb.
So for GDK this is pretty much a wontfix. If we keep this open, then against pygobject, as its Gdk overrides trigger the initialization of GTK/GDK on import. This is mostly due to being backwards compatible with PyGTK, and all Python code out there which uses Gtk/Gdk expects this, and doesn't call Gdk.init()/Gtk.init() explicitly. So the wishlist bug would be to not try and initialize Gdk if there's no DISPLAY or runtime dir, but that's really not something which we want to carry downstream.
It's not a segfault, it's a g_error() and thus a SIGABRT. This happens in gdk_display_ manager_ open_display( ): It iterates over all available backends, and as there is no $DISPLAY the X.org backend fails. Then it tries the wayland backend but there is no $XDG_RUNTIME_DIR either so it fails as well.
The obvious workaround here is to either run the thing under Xvfb to provide a $DISPLAY, or set $XDG_RUNTIME_DIR to some $(CURDIR) /debian/ tmp during package build. But of course in the latter case Gdk won't actually do anything. So if you import Gdk to use it, I'd rather recommend xvfb.
So for GDK this is pretty much a wontfix. If we keep this open, then against pygobject, as its Gdk overrides trigger the initialization of GTK/GDK on import. This is mostly due to being backwards compatible with PyGTK, and all Python code out there which uses Gtk/Gdk expects this, and doesn't call Gdk.init( )/Gtk.init( ) explicitly. So the wishlist bug would be to not try and initialize Gdk if there's no DISPLAY or runtime dir, but that's really not something which we want to carry downstream.