Re: [gupnp] [PATCH] Fix potential crash in resource_expire()
- From: "Zeeshan Ali (Khattak)" <zeenix gmail com>
- To: gupnp o-hand com
- Cc: Sven Neumann <s neumann raumfeld com>
- Subject: Re: [gupnp] [PATCH] Fix potential crash in resource_expire()
- Date: Thu, 16 Dec 2010 14:56:10 +0200
Hi Sven,
On Thu, Nov 18, 2010 at 3:03 PM, Zeeshan Ali (Khattak) <zeenix gmail com> wrote:
> Hi Sven,
>
> On Mon, Nov 15, 2010 at 10:58 AM, Sven Neumann <s neumann raumfeld com> wrote:
>> GSSDPResourceBrowser emits "resource-unavailable" before it has removed
>> the resource from its cache. Now if the application changes the cache
>> in response to this signal emission the code will crash.
>>
>> Fix this potential crash by emitting the signal after the resource
>> has been removed from the cache.
gupnp-universal-cp had started to randomly crash recently. The crash
was happening just after a 'signal xxx invalid for instance xxx'
warning from gobject. Running it as
`G_DEBUG='fatal-warnings,fatal-criticals' gdb gupnp-universal-cp` I
narrowed down the issue to the part which you changed with this patch
recently:
Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=<value optimized out>,
log_level=G_LOG_LEVEL_WARNING, format=0xaf3500 "%s: signal id `%u' is
invalid for instance `%p'",
args1=0xbfffeaec "\226\063\257") at gmessages.c:563
563 g_private_set (g_log_depth, GUINT_TO_POINTER (depth));
(gdb) bt
#0 g_logv (log_domain=<value optimized out>,
log_level=G_LOG_LEVEL_WARNING, format=0xaf3500 "%s: signal id `%u' is
invalid for instance `%p'",
args1=0xbfffeaec "\226\063\257") at gmessages.c:563
#1 0x00b55b42 in g_log (log_domain=0xaefaa4 "GLib-GObject",
log_level=G_LOG_LEVEL_WARNING,
format=0xaf3500 "%s: signal id `%u' is invalid for instance `%p'")
at gmessages.c:577
#2 0x00add90d in g_signal_emit_valist (instance=0x828eed0,
signal_id=208, detail=0, var_args=0xbfffec4c "`\006*\b\364\337\277")
at gsignal.c:2931
#3 0x00ade552 in g_signal_emit (instance=0x828eed0, signal_id=208,
detail=0) at gsignal.c:3040
#4 0x0083dd8b in resource_expire (user_data=0x824fd00) at
gssdp-resource-browser.c:596
#5 0x00b4b19c in g_timeout_dispatch (source=0x82bb1b8, callback=0x1,
user_data=0x824fd00) at gmain.c:3688
#6 0x00b4a9b5 in g_main_dispatch (context=0x8083e08) at gmain.c:2267
#7 g_main_context_dispatch (context=0x8083e08) at gmain.c:2824
#8 0x00b4ebc8 in g_main_context_iterate (context=0x8083e08,
block=<value optimized out>, dispatch=1, self=0x8057048) at
gmain.c:2902
#9 0x00b4f107 in g_main_loop_run (loop=0xb4800c60) at gmain.c:3110
#10 0x00277169 in IA__gtk_main () at gtkmain.c:1238
#11 0x0804d29f in main (argc=1, argv=0xbfffef24) at main.c:119
I reset the HEAD to the parent commit of this and so far I have
failed to reproduce the issue. Are you sure your patch fixes a crash
rather than the opposite? :)
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
--
To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]