After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771497 - Failing assertion in grl-net-wc produces crash
Failing assertion in grl-net-wc produces crash
Status: RESOLVED DUPLICATE of bug 771338
Product: grilo
Classification: Other
Component: core
unspecified
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2016-09-15 18:06 UTC by Adrien Plazas
Modified: 2016-09-15 20:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adrien Plazas 2016-09-15 18:06:40 UTC
In gnome-games I encountered really annoying crashes coming from get_url_cb from the grl-net-wc.c file.

In this code:
>   /* validation */
>   {
>     GrlNetWcPrivate *priv = c->self->priv;
>     struct request_clos *d = g_queue_pop_tail (priv->pending);
>     g_assert (c == d);
>   }

Sometimes the assertion fails indeed sometimes the get_url_cb function is called with a request_clos located later in the list of pending requests.

I suspsect this is caused by callbacks being called sometimes on idle and sometimes on a timeout: if an 'idle' callback is added after a 'timeout' one it may be triggered first, breaking the order.

I'm not sure how to fix this properly though. :) Extracting the correct request from the pending requests queue rather than the first one and asserting that the extraction worked may be a solution.
Comment 1 Victor Toso 2016-09-15 20:18:24 UTC
Great report! Would be 100% with a test case ;)
But this one is duplicated of bug 771338 which has a reproducer and some patches, let me know if they fix the issue for you!
Cheers,

*** This bug has been marked as a duplicate of bug 771338 ***