QT5 classic snaps segmentation fault

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.

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

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

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

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?

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

Can you elaborate on what that patch is doing? I’m trying to work out if it may help address what is potentially the same issue with the cmake snap (details in this post, with backtrace of an example crash). If I understand the patch correctly, I’d need to replace snapcraft with cmake, but I don’t really understand why the patch would be necessary at all. The backtrace in the cmake case already seems to show the right paths to libraries, so potentially it’s not a fix for that problem, but the description here seems very close to what appears to be happening with cmake as well (command line tools work fine, GUI crashes only on some machines).

1 Like

Sorry, meant to ping you directly @sergiusens for the above comment

Is cmake gui using python?

No, the cmake-gui does not use python at all.

Ah, so this might not affect you in the slightest. This might be related to the inclusion of desktop-launch in your snap. Mind opening a new topic? Also, nudge on maybe publishing cmake for all the supported architectures :slight_smile:

1 Like

There’s already a dedicated topic for it as linked to earlier (you can find it here). Supporting multiple architectures is on my todo list, but need this problem solved first.

1 Like