Re: soup causes segfault after returning message



On Thu, 2009-08-20 at 07:53 -0400, Dan Winship wrote:
> On 08/16/2009 07:41 PM, Matt Novenstern wrote:
> > Hello all,
> > 	I'm a bit new to all this glib and C, and I can't figure out why this
> > is happening.  This comes after the third reply to a message in my
> > program calls its callback.  I don't even know why soup is causing the
> > error, since it happens after control has returned to my code.  I'm
> > fairly sure it's my fault, but, then I don't know why the other 2
> > request/responses work fine.
> 
> It looks like some sort of memory-handling error; perhaps you are
> unreffing something you shouldn't be. (Note that
> soup_session_queue_message() steals your reference on the SoupMessage,
> so you do not need to unref it afterward. And also, if you want to stop
> a message you have queued before it has finished, you can't just unref
> it, you have to call soup_session_cancel_message()). But it's impossible
> to say without seeing the code.
> 
> -- Dan
> 
> > 0xb7dde7c1 in g_type_instance_get_private ()
> > from /usr/lib/libgobject-2.0.so.0
> > (gdb) bt
> > #0  0xb7dde7c1 in g_type_instance_get_private ()
> > from /usr/lib/libgobject-2.0.so.0
> > #1  0xb7e954bd in do_idle_run_queue (session=0xb7ea5b24) at
> > soup-session-async.c:399
> > #2  0xb7e95ee6 in final_finished (req=0x8779010, user_data=0x87846c0)
> >     at soup-session-async.c:382
> > #3  0xb7dd1274 in g_cclosure_marshal_VOID__VOID ()
> > from /usr/lib/libgobject-2.0.so.0
> > #4  0xb7dc3b6b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> > #5  0xb7dd828a in ?? () from /usr/lib/libgobject-2.0.so.0
> > 
> > 

Dan,
	Thanks, I was unreffing the message inside a callback.  Is there going
to be gzip decoding in libsoup any time soon?

-Matt



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]