Skip to content
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

Glib errors when refreshing cache after 0.11 update #112

Closed
antonio-rojas opened this issue May 4, 2017 · 4 comments
Closed

Glib errors when refreshing cache after 0.11 update #112

antonio-rojas opened this issue May 4, 2017 · 4 comments

Comments

@antonio-rojas
Copy link
Contributor

The first time the cache is refreshed after updating to 0.11 gives lots of errors like

(appstreamcli:6240): GLib-CRITICAL **: g_variant_get_type: assertion 'value != NULL' failed

(appstreamcli:6240): GLib-CRITICAL **: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed

(appstreamcli:6240): GLib-CRITICAL **: g_variant_get_int32: assertion 'g_variant_is_of_type (value, G_VARIANT_TYPE_INT32)' failed

It only happens the first time, any subsequent cache refresh finishes without errors. The refresh seems to finish correctly despite the errors, but it certainly looks scary (and I'm already getting reports about it downstream)

@ximion
Copy link
Owner

ximion commented May 4, 2017

Yeah, it's weird that this happens - I think the safest thing to prevent this from happening is to just bump the cache revision number everytime anything is changed on the serialization, as GVariant doesn't seem to cope with most changes.

An easy way to work around this issue and a thing we do in Debian anyway is to run "appstreamcli refresh --force" in the packages post-install hook.
That ensures the cache is always recent (and also saves a bit of time next time we run an apt update in Debian's case)-

@antonio-rojas
Copy link
Contributor Author

We do run "appstreamcli refresh --force" post-install, that's how this issue came up. Users are seeing this scary message when updating their systems.

So I take it is safe to ignore it?

@ximion
Copy link
Owner

ximion commented May 4, 2017

Yes, you can ignore it, but thanks for reporting it! There definitely is a bug here, I will look into it when I'm back home (for starters, the cache shouldn't be loaded when refreshing it).

@ximion
Copy link
Owner

ximion commented Jul 1, 2017

This is fixed now as per 9fa293a - with future release I plan to improve the cache a bit more (mainly increase its performance a little).

@ximion ximion closed this as completed Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants