Segmentation fault when running my snap

I’m currently working on my first Snap, but I’m having problems when I run it. I get a segmentation fault. Can anyone see any things I do wrong in my snapcraft.yaml?
The reason why I’m installing glew from .deb is that the application only works with 1.10 and the one in the repos is newer.

name: runescape
version: '123'
summary: RuneScape
description: |
  RuneScape

grade: stable
confinement: devmode

parts:
  glew:
    plugin: dump
    source: http://launchpadlibrarian.net/161405671/libglew1.10_1.10.0-3_amd64.deb
    source-type: deb
  runescape:
    plugin: dump
    source: https://content.runescape.com/downloads/ubuntu/pool/non-free/r/runescape-launcher/runescape-launcher_2.2.4_amd64.deb
    source-type: deb
    # Correct path to icon.
    prepare: |
      sed -i 's|Icon=runescape|Icon=/usr/share/icons/hicolor/256x256/apps/runescape.png|g' usr/share/applications/runescape-launcher.desktop
    after:
      - desktop-gtk2
    stage-packages:
      - libsdl2-2.0-0
      - libc6
      - libcurl3-gnutls
      - libstdc++6
      - libgcc1
      - libvorbisenc2
      - libwebkitgtk-1.0-0
apps:
  runescape:
    command: usr/share/games/runescape-launcher/runescape 
    desktop: usr/share/applications/runescape-launcher.desktop
    plugs:
      - gsettings
      - home
      - network
      - opengl
      - pulseaudio
      - x11
1 Like

It fails differently for me. I installed it in devmode.

/snap/runescape/x1/usr/share/games/runescape-launcher/runescape: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

I expect you might be missing a path configuration, which you should get from the desktop-gtk2 launcher you’re not actually using.

    command: desktop-launch $SNAP/usr/share/games/runescape-launcher/runescape 

But even if you do that, the launcher probably expects to be on a normal linux system where it has write / read access in interesting places. So could be fun/challenging to snap.