Segmentation fault (core dumped)

I’m trying to release a new version of gitl (https://github.com/wieczorek1990/gitl).
Since libc6 is required to craft the snap I’m having trouble to run gitl.
In bash after running gitl I get
Segmentation fault (core dumped)
or in fish:
fish: “gitl” terminated by signal SIGSEGV (Address boundary error)
How can I debug? Or should I build differently?
I’m on Ubuntu 18.04.

Have you tried building it on Xenial (perhaps using snapcraft cleanbuild)?

cleanbuild fixed the problem. Also I did not understand confinement strict vs classic. Had to choose classic.

Strict confinement puts the application in a sandbox. This has the advantage that you have predictable libraries (from the sandbox) but the disadvantage that everything that the sandbox doesn’t allow requires a snap interface to operate.

Classic puts the application directly on the system. This has the advantage that the application can do anything and it can act on the real system. The disadvantage is that it must be appropriately crafted to use shared libraries from the core snap or it can result in various issues like you saw, where it works in some environment but not in another one.

If you are using classic confinement then please look at Call for testing and usage: classic-snap-analyzer