Debugging Snap Segmentation Fault of Hypnotix app

Trying running my build of Hypnotix in snap results in segmentation fault:

user@hp-laptop:~$ hypnotix
Segmentation fault (core dumped)

Is there a way to debug the issue (I’ve tried gdb but it doesn’t seem to target the actual binary)? The app works fine without snap.

My manifest is as follows:

name: hypnotix
base: core22
version: '4.2'
summary: S
description: D
grade: stable
confinement: strict

package-repositories:
 - type: apt
   ppa: kelebek333/mint-tools

parts:
  hypnotix:
    plugin: nil
    stage-packages:
      - hypnotix
    override-prime: |
      snapcraftctl prime

      sed -i -e 's|"/usr/share/hypnotix/countries.list|os.environ["RESBASE"]+"/share/hypnotix/countries.list|g' usr/lib/hypnotix/hypnotix.py
      sed -i -e 's|"/usr/share/hypnotix|os.environ["RESBASE"]+"/share/hypnotix|g' usr/lib/hypnotix/hypnotix.py
      sed -i -e 's|f"/usr/share/circle-flags-svg/|os.environ["RESBASE"]+f"/share/circle-flags-svg/|g' usr/lib/hypnotix/hypnotix.py
      sed -i -e 's|"/usr/share/locale|os.environ["RESBASE"]+"/share/locale|g' usr/lib/hypnotix/hypnotix.py

apps:
  hypnotix:
    extensions: [gnome]  
    command: usr/lib/hypnotix/hypnotix.py
    desktop: usr/share/applications/hypnotix.desktop
    environment:
      RESBASE: $SNAP/usr
    plugs:
      - network

You can try to follow this guide: Using gdb and gdbserver This should at least give you a backtrace. In any way, since you got a segfault and a coredump, you should be able to inspect that even without invoking the snap.

I faced the same, and even the upstream didn’t help back then. So, I simply stopped working on it. This is my yaml file

name: hypnotix
version: '3.2'
base: core22
icon: snap/hypnotix.svg
summary: IPTV player for M3U playlists
description: |
  Hypnotix is an IPTV streaming application with support for live TV, movies and series.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
layout:
  /usr/lib/hypnotix:
    bind: $SNAP/usr/lib/hypnotix
  /usr/share:
    bind: $SNAP/usr/share
parts:
  hypnotix:
    source: https://github.com/linuxmint/hypnotix.git
    plugin: dump
    stage-packages:
      - gir1.2-xapp-1.0
      - libxapp1
      - python3-imdbpy
      - libmpv1
      - python3-requests
      - xapps-common
    prime:
      - usr/*
apps:
  hypnotix:
    command: usr/bin/hypnotix
    extensions: [ gnome ]
    desktop: usr/share/applications/hypnotix.desktop
    environment:
      DISABLE_WAYLAND: 1
    plugs:
      - home
      - mount-observe
      - network
      - network-bind

Give it a try by modifying it. It also doesn’t uses any manual repo

1 Like