QT5 classic snaps segmentation fault


#1

Hello! I have confused with strange bug of classic snap package based on QT5.

I have Ubuntu 19.04 with 2 videocards: Intel and Nvidia with installed nvidia-driver-418. My successfully build snap failed to start with segmentation fault error on Intel.

But if I switch on nvidia card all works fine. My snapcraft config: https://github.com/october21/eric-snap/blob/master/snapcraft.yaml.

Probably this bug affects all snap packages with QT and classic mode.

Does anybody know something about it?

Thanks in advance.


#2

So, guys, does anybody know about this problem? Or how to debug this? I can add any additional information if required


#3

If you are using ctypes with python (through a dependency or not), you will need to do something like https://github.com/snapcore/snapcraft/blob/master/patches/ctypes_init.diff


#4

@sergiusens Thanks for your reply. How I can properly to apply this patch? Is it must be in snapcraft.yaml?


#5

So I trying to add ctypes patch to build process like this:

patch $SNAPCRAFT_STAGE/usr/lib/python3.6/ctypes/__init__.py $SNAPCRAFT_STAGE/patches/ctypes_init.diff

ctypes patched successfully. However after install and run I have core dumped again:

python3: ../src/mesa/drivers/dri/i965/brw_disk_cache.c:391: brw_disk_cache_init: Assertion `note && build_id_length(note) == 20' failed.
Aborted (core dumped)

Any ideas to fix this?


#6

My shared ctypes patch needs to be adapted to the libraries you use, it is not a generic patch.