GTK3 FileChooser crashing

Hi –

Ran into a snap problem i can’t fix while trying to snap a (relatively) simple GTK3 app.

I’m building the snap in a Xenial VM with classic confinement (which I need). The snap works fine in a Xenial desktop environment. When I install the snap in Bionic, however, it crashes with NO error message when GTK tries to open the FileChooser dialog (the glib schemas do seem to be present in both ~/snap and /snap for the app). If I switch to strict confinement, the FileChooser dialog works in both environments, but aspects of the app don’t work because I need classic confinement.

So the question is, how can I get FileChooser to work with classic confinement? I guess the issue has something to do with the snap’s interaction with glib based on the confinement, but I’m out of ideas.

Any help would be appreciated!

This is my snapcraft.yaml – I copied it from another GTK project on GitHub, so I’m not 100% sure everything in there needs to be there :slight_smile:

name: draftman
version: 1.0.0
summary: Draft management for writers
description: |
  Draftman is a draft-management system for writers.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: classic

plugs:
  gnome-3-26-1604:
    interface: content
    target: $SNAP/gnome-platform
    default-provider: gnome-3-26-1604
  gtk-3-themes:
    interface: content
    target: $SNAP/data-dir/themes
    default-provider: gtk-common-themes
  icon-themes:
    interface: content
    target: $SNAP/data-dir/icons
    default-provider: gtk-common-themes

slots:
  # for GtkApplication registration
  draftman:
    interface: dbus
    bus: session
    name: com.spencerseidel.Draftman

apps:
  draftman:
    command: bin/desktop-launch $SNAP/usr/bin/draftman
    plugs:
      - home
      - desktop
      - desktop-legacy
      - gsettings
      - network
      - unity7
      - wayland

parts:
  draftman:
    source-type: local
    source: .
    plugin: make
    build-packages:
      - libglib2.0-dev
      - libgtk-3-dev
    after:
      - desktop-gtk3
1 Like