New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when opening the database #8
Comments
|
Looks like the database version is set incorrectly. I will catch the error on string conversion, but we should also check why the version number is wrong. --- a/src/xapian/database-read.cpp
+++ b/src/xapian/database-read.cpp
@@ -63,6 +63,8 @@ DatabaseRead::open (const gchar *dbPath)
if (m_dbLocale.empty ())
m_dbLocale = "C";
+ g_debug ("Read DB schema version: %s", m_xapianDB.get_metadata ("db-schema-version").c_str ());
+
m_schemaVersion = stoi (m_xapianDB.get_metadata ("db-schema-version"));
if (m_schemaVersion != AS_DB_SCHEMA_VERSION) {
g_warning ("Attempted to open an old version of the AppStream cache. Please refresh the cache and try again!"); |
|
It seems empty. |
This should resolve issue #8, but doesn't fix the root cause of it (which is that the database metadata field holding the schema version is apparently empty)
|
Okay, so the crash should be gone now, let's fix the root cause of this issue. |
|
|
Okay, that looks sane - could you run the unit tests please, and see if the database test fails? |
|
It passes now after the last changes in master, also appstream search works now. I'll close the issue. |
|
Maybe this was an artifact of the mix of different AppStream libraries in the past... |
I fixed the db lookup bug, it was due to having 2 libappstream.so on the system, it worked by specifying the LD_LIBRARY_PATH (without using sudo).
Now, with the proper libraries, I get such a crash when opening the db.
The text was updated successfully, but these errors were encountered: