f1u77y / wmc-mpris

MPRIS proxy for usage with Web Media Controller on GNU/Linux
The Unlicense
25 stars 1 forks source link

Crashes after some time #4

Open TomaszGasior opened 5 years ago

TomaszGasior commented 5 years ago

I am not sure whether this is bug in browser extension or system binary. I use Firefox with https://github.com/f1u77y/web-media-controller and with web-media-controller-mpris-git AUR package. When I start Firefox and youtube/spotify, extension works but after some time it crashes. This is log from browser console (Ctrl+Shift+J):

stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.418: g_variant_new_object_path: assertion 'g_variant_is_object_path (object_path)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.420: g_variant_new_variant: assertion 'value != NULL' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.420: g_variant_get_type: assertion 'value != NULL' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.421: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.421: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.421: g_variant_builder_end: assertion 'GVSB(builder)->offset >= GVSB(builder)->min_items' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.421: g_variant_get_type: assertion 'value != NULL' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.421: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:14.421: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_new_object_path: assertion 'g_variant_is_object_path (object_path)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_new_variant: assertion 'value != NULL' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_get_type: assertion 'value != NULL' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_builder_end: assertion 'GVSB(builder)->offset >= GVSB(builder)->min_items' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_get_type: assertion 'value != NULL' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed
stderr output from native app me.f1u77y.web_media_controller: 
stderr output from native app me.f1u77y.web_media_controller: (process:9157): GLib-CRITICAL **: 14:41:18.866: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
f1u77y commented 5 years ago

It seems that wmc-mpris cannot create a D-Bus object path from what it gets from the extension. Could you check if extension crashes on the same video on YouTube or track on Spotify? If it does, please give me link to that video or track and I'l try to reproduce. Unfortunately, I cannot reproduce this bug now and have never experienced it before.

And please say what commit of wmc-mpris are you using (AUR package version has this info) and what version of WMC are you using.

TomaszGasior commented 5 years ago

And please say what commit of wmc-mpris are you using (AUR package version has this info) and what version of WMC are you using.

Usually -git AUR package are just code from master packages and that's the case. I installed the package today. :) Extension is in the newest on Mozilla Addons, 0.94

Could you check if extension crashes on the same video on YouTube or track on Spotify?

There is no specific link. It happens with various videos/songs on YT/spotify.

I will do additional check with clean browser profile.

f1u77y commented 5 years ago

Usually -git AUR package are just code from master packages and that's the case.

Yes but you could have installed the package some time before, so it could be not the latest commit.

I installed the package today.

Okay, that info is enough.

There is no specific link. It happens with various videos/songs on YT/spotify.

Strange. I believe it should happen consistently with same videos but I could be wrong.

Please build wmc-mpris from master and run it with the following patch to check if my assumption about track IDs is correct:

diff --git a/src/mpris2.c b/src/mpris2.c
index def40eb..9b87a4c 100644
--- a/src/mpris2.c
+++ b/src/mpris2.c
@@ -257,6 +257,7 @@ add_value_to_metadata_builder(JsonObject *serialized_metadata,
                 g_variant_new_string(value));
     } else if (!g_strcmp0(key, "trackId")) {
         const gchar *value = json_node_get_string(value_node);
+        fprintf(stderr, "trackId = '%s'\n", value);
         g_variant_builder_add(builder, "{sv}",
                 "mpris:trackid",
                 g_variant_new_object_path(value));
f1u77y commented 4 years ago

@TomaszGasior is this issue still reproducible?

Anyway, I plan to mangle track IDs that come from extension, so there should be less space for the bugs.