Bug 486596 - Snap crashes when creating a new image on ubuntu
Summary: Snap crashes when creating a new image on ubuntu
Status: NEEDSINFO FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 5.2.2
Platform: Snap Linux
: NOR crash
Target Milestone: ---
Assignee: Scarlett Moore
URL:
Keywords:
: 485782 497872 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-05 00:32 UTC by nrobinaubertin
Modified: 2024-12-31 14:08 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nrobinaubertin 2024-05-05 00:32:50 UTC
SUMMARY

Using the latest snap from the stable channel (revision 104) on ubuntu mantic (23.10), it crashes when trying to create a new project.

STEPS TO REPRODUCE
1. Install the latest version `snap install krita`
2. Open krita
3. Create a new image (a new project)

OBSERVED RESULT

The snap crashes

EXPECTED RESULT

It should create a new project

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: ubuntu 23.10
Qt Version: N/A

ADDITIONAL INFORMATION

My current workaround is to lock the snap version to the revision 98 (which works).
```
snap install krita --revision=98
snap refresh --hold=forever krita
```
Comment 1 Halla Rempt 2024-10-31 10:21:44 UTC
I can confirm the crash:
halla@thinkstation:~/dev/krita$ krita
Qt: Session management error: Could not open network socket
Qt: Session management error: Could not open network socket
Qt: Session management error: Could not open network socket
Qt: Session management error: Could not open network socket
kf.config.core: Watching absolute paths is not supported "/snap/krita/104/usr/share/color-schemes/KritaDark.colors"
Invalid profile :  "/snap/krita/104/usr/share/color/icc/colord/Crayons.icc"
Invalid profile :  "/snap/krita/104/usr/share/color/icc/colord/x11-colors.icc"
krita.lib.resources: Created table "version_information"
krita.lib.resources: Created table "storage_types"
krita.lib.resources: Created table "resource_types"
krita.lib.resources: Created table "storages"
krita.lib.resources: Created table "tags"
krita.lib.resources: Created table "resources"
krita.lib.resources: Created table "versioned_resources"
krita.lib.resources: Created table "resource_tags"
krita.lib.resources: Created table "metadata"
krita.lib.resources: Created table "tags_storages"
krita.lib.resources: Created table "tag_translations"
krita.lib.resources: Created table "storages"
krita.lib.resources: Created table "versioned_resources"
krita.lib.resources: Created table "tags"
krita.lib.resources: Created table "resources"
krita.lib.resources: Created table "tag_translations"
krita.lib.resources: Created table "resource_tags"
krita.lib.resources: Created table "resources_signature"
krita.lib.resources: Filled lookup table storage_types
krita.lib.resources: Filled lookup table resource_types
krita.lib.resources: Filled version table
propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.304\" (uid=1000 pid=17797 comm=\"/snap/krita/104/usr/bin/krita\" label=\"snap.krita.krita (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1332 comm=\"/usr/sbin/NetworkManager --no-daemon\" label=\"unconfined\")"
nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.304\" (uid=1000 pid=17797 comm=\"/snap/krita/104/usr/bin/krita\" label=\"snap.krita.krita (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1332 comm=\"/usr/sbin/NetworkManager --no-daemon\" label=\"unconfined\")"
"Object path cannot be empty"
krita.scripting: "Traceback (most recent call last):"
krita.scripting: "  File \"/snap/krita/104/usr/lib/x86_64-linux-gnu/krita-python-libs/krita/__init__.py\", line 11, in <module>"
krita.scripting: "    from .api import *"
krita.scripting: "  File \"/snap/krita/104/usr/lib/x86_64-linux-gnu/krita-python-libs/krita/api.py\", line 15, in <module>"
krita.scripting: "    from PyKrita.krita import *"
krita.scripting: "ModuleNotFoundError: No module named 'PyQt5'"
krita.scripting: "Could not import krita"
QOpenGLShaderProgram: could not create shader program
Shader Compilation Failure:  "Failed to add vertex shader source from file: matrix_transform.vert - Cause: "
Segmentation fault (core dumped)

It also looks like the snap is no longer maintained, because it is still 5.2.2, while Krita is at 5.2.6. We don't maintain the snap ourselves anymore. Scarlett, are you still involved with the snaps?
Comment 2 Halla Rempt 2024-10-31 10:22:46 UTC
*** Bug 485782 has been marked as a duplicate of this bug. ***
Comment 3 Scarlett Moore 2024-10-31 11:49:30 UTC
I am so sorry!  I was in a car accident and broke my arm. During surgery I got a mrsa infection and have been hospitalized twice since then, last time I was in sepsis. I haven't had any spare time in many months. I was struggling with this one. At the time my ability to update the kf5 content snap was removed by sysadmin, but has now been restored. I have some spare time now and will build latest with the new content snap and cross my fingers. Again I am so sorry.
Comment 4 Halla Rempt 2024-10-31 13:33:02 UTC
Eek, that's really bad!
Comment 5 Halla Rempt 2024-12-25 12:41:21 UTC
*** Bug 497872 has been marked as a duplicate of this bug. ***
Comment 6 bj 2024-12-27 20:35:48 UTC
@Scarlett Moore: Sorry to hear that.
However, no need to apologize. This can happen to anyone.

Besides: The Situation could be worse.
Yes, Ubuntu's AppStore uses Snaps by default, but experienced users have ways to work around that. It's only the newbies that can currently not use Krita - however, in most cases they will know someone they can ask for help.

Situations like this one are a call to work on the project's structure and organization.
It is probably a good idea when at least 2 people have the access required to publish the snap packages so they can act as proxies when one of them happens to be temporarily unavailable.
Comment 7 Scarlett Moore 2024-12-29 12:41:06 UTC
(In reply to bj from comment #6)
> @Scarlett Moore: Sorry to hear that.
> However, no need to apologize. This can happen to anyone.
> 
> Besides: The Situation could be worse.
> Yes, Ubuntu's AppStore uses Snaps by default, but experienced users have
> ways to work around that. It's only the newbies that can currently not use
> Krita - however, in most cases they will know someone they can ask for help.
> 
> Situations like this one are a call to work on the project's structure and
> organization.
> It is probably a good idea when at least 2 people have the access required
> to publish the snap packages so they can act as proxies when one of them
> happens to be temporarily unavailable.

I was once again hospitalized with another surgery, and now I have covid! I can't win for losing.
Anyone with an invent account can do a MR to help out. Sadly there is no interest. I had a little help this year from soumyadeep. Maybe he can take a look.
Comment 8 Soumyadeep Ghosh 2024-12-29 18:03:52 UTC
The snap is unable to find/link the matrix_transform.vert... can anybody give some idea how does it work? or how to check if the link is correctly done or not?
Comment 9 Halla Rempt 2024-12-30 10:02:00 UTC
The shaders should be built into krita: they are linked through krita/data/sharers.qrc . So, Qt does find the shaders and tries to compile them, but there's a segfault. I'm not sure how snap handles opengl -- maybe there's a problem where opengl handling is broken for some reason.
Comment 10 Scarlett Moore 2024-12-30 12:47:46 UTC
Alright, so it looks like we need a newer qt5/kf5 which we still can't do until https://github.com/canonical/snapcraft/pull/5092 gets merged. Hopefully soon.
Comment 11 Scarlett Moore 2024-12-31 14:08:40 UTC
Please test --edge! I was able to build locally with new qt5/kf5 and I can now open/save images.