The Bombsquad snap I published has a weird issue I cannot fathom how to solve. It works, but only from the second time you run it. The first time, it always crashes. Second time onward is fine. I have made it unlisted until this is solved. Anyone got any ideas?
Yaml is here.
Here’s first run:
$ snap run bombsquad
update.go:85: cannot change mount namespace according to change mount (/run/user/1000/doc/by-app/snap.bombsquad /run/user/1000/doc none bind,rw,x-snapd.ignore-missing 0 0): cannot inspect "/run/user/1000/doc": lstat /run/user/1000/doc: permission denied
Testing for explicit PulseAudio choice...
...and PulseAudio has been explicitly chosen, so using it.
root: BombSquad 1.7.28 build 21325.
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM sysdefault
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
FATAL ERROR: No audio devices found. Do you have speakers/headphones/etc. connected?
CPP-STACK-TRACE-BEGIN:
./bombsquad(_ZN10ballistica4core12CorePlatform13GetStackTraceEv+0x4d) [0x561be481822d]
./bombsquad(_ZN10ballistica10FatalError16ReportFatalErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x207) [0x561be49093e7]
./bombsquad(_ZN10ballistica10FatalErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x22) [0x561be49035d2]
./bombsquad(_ZN10ballistica4base11AudioServer18OnAppStartInThreadEv+0x7a0) [0x561be47450d0]
./bombsquad(_ZN10ballistica9EventLoop20RunPendingRunnables_Ev+0x70) [0x561be4904140]
./bombsquad(_ZN10ballistica9EventLoop4Run_Eb+0x158) [0x561be4904ac8]
./bombsquad(_ZN10ballistica9EventLoop11ThreadMain_Ev+0x21f) [0x561be490588f]
./bombsquad(_ZN10ballistica9EventLoop17ThreadMainAudioP_EPv+0xd) [0x561be4905b9d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609) [0x7f024daf7609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7f024cc8f133]
CPP-STACK-TRACE-END
/snap/bombsquad/x1/bin/launcher: line 4: 881875 Aborted (core dumped) ./bombsquad "$@"
Here’s second run, which works fine.
$ snap run bombsquad
update.go:85: cannot change mount namespace according to change mount (/run/user/1000/doc/by-app/snap.bombsquad /run/user/1000/doc none bind,rw,x-snapd.ignore-missing 0 0): cannot inspect "/run/user/1000/doc": lstat /run/user/1000/doc: permission denied
Testing for explicit PulseAudio choice...
...and PulseAudio has been explicitly chosen, so using it.
root: BombSquad 1.7.28 build 21325.
>>> AL lib: (EE) alc_cleanup: 1 device not closed