Summary: | Snapd Backend crashes in SnapBackend::populateJobsWithFilter() with Plasma 6 Discover | ||
---|---|---|---|
Product: | [Applications] Discover | Reporter: | Jonathan L Hanmann <jhanmann> |
Component: | Snap Backend | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED NOT A BUG | ||
Severity: | crash | CC: | aleixpol, nate |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | valgrind output log |
Description
Jonathan L Hanmann
2024-04-09 01:25:54 UTC
Below is the patch I made to libsnapd-qt-2-1 (version 1.64-0ubuntu5 from the Ubuntu Noble source package. This enabled me to build discover but I don't know enough to determine if my change could be part of the problem so I thought to be thorough on this. Index: snapd-glib-1.64/snapd-qt/auth-data.cpp =================================================================== --- snapd-glib-1.64.orig/snapd-qt/auth-data.cpp +++ snapd-glib-1.64/snapd-qt/auth-data.cpp @@ -15,7 +15,7 @@ QSnapdAuthData::QSnapdAuthData (void *sn QSnapdAuthData::QSnapdAuthData (QObject *parent) : QSnapdWrappedObject (snapd_auth_data_new ("", NULL), g_object_unref, parent) {} -QSnapdAuthData::QSnapdAuthData (const QString& macaroon, const QStringList& discharges, QObject *parent) : QSnapdWrappedObject (NULL, g_object_unref, parent) +QSnapdAuthData::QSnapdAuthData (const QString& macaroon, const QList<QString>& discharges, QObject *parent) : QSnapdWrappedObject (NULL, g_object_unref, parent) { g_auto(GStrv) strv = g_new (gchar *, discharges.size () + 1); int i; Index: snapd-glib-1.64/snapd-qt/Snapd/auth-data.h =================================================================== --- snapd-glib-1.64.orig/snapd-qt/Snapd/auth-data.h +++ snapd-glib-1.64/snapd-qt/Snapd/auth-data.h @@ -22,7 +22,7 @@ class Q_DECL_EXPORT QSnapdAuthData : pub public: explicit QSnapdAuthData (void *snapd_object, QObject* parent = 0); - explicit QSnapdAuthData (const QString& macaroon, const QStringList& discharges, QObject* parent = 0); + explicit QSnapdAuthData (const QString& macaroon, const QList<QString>& discharges, QObject* parent = 0); explicit QSnapdAuthData (QObject* parent = 0); QString macaroon () const; Created attachment 168718 [details]
valgrind output log
Added valgrind output log from failure
After a lot of trial and error I found that it was indeed due to my snapd-glib-qt. Since I'm building on Ubuntu Noble (beta obviously I guess) the existing package is built against Qt 6.42 probably. This caused the symbol problem which I tried to work around by changing the QStringList to a QList<QString> which appeared to work. Although it built ok it caused the runtime crash somehow. I don't understand that exact mechanism. My solution was to build Qt 6.7.0 packages for my system. That took several days to figure out all by itself. I then rebuilt Snapd-Glib against Qt 6.7.0 using. When I installed that and then rebuilt Discover, voila!, it now appears to start and work ok. I will close this if I am allowed to since it was my own problem which I've now resolved. |