[Adium-devl] g_string_free() and me (aka gaim [17165] doesn't like Adium)

Mark Doliner mark at kingant.net
Mon Sep 11 06:30:23 UTC 2006


On Sun, 10 Sep 2006 21:46:48 -0400, Evan Schoenberg wrote
> > On Sep 10, 2006, at 8:48 PM, David Smith wrote:
> >
> >> 	I'm still seeing a crash in try_connect when connecting jabber  
> >> accounts, on a fresh trunk build.
> 
> Yeah, I don't think the dnsquery fix actually changed proxy.c's  
> problem.. I'm not sure why it worked briefly for me, but maybe I  
> hadn't copied libgaim in properly.
> 
> 	g_free(connect_data->write_buffer);
> appears to be where it's crashing.
> 
> (gdb) bt full
> #0  0x9004802c in kill ()
> No symbol table info available.
> #1  0x9012dfb4 in abort ()
> No symbol table info available.
> #2  0x90006510 in free ()
> No symbol table info available.
> #3  0x087942d8 in gaim_proxy_connect_data_disconnect  
> (connect_data=0xded10b0, error_message=0x901a1cb4 "Bad file  
> descriptor") at /Users/evands/libgaim/Libgaim/src/proxy.c:341
> No locals.
> #4  0x087944cc in socket_ready_cb (data=0xded10b0, source=0x0,  
> cond=2684371312) at /Users/evands/libgaim/Libgaim/src/proxy.c:428
> 	len = 0x4
> 	error = 0x9
> #5  0x03635330 in socketCallback (s=0xda38270,  
> callbackType=kCFSocketWriteCallBack, address=0x0, data=0x0,  
> infoVoid=0xda7e030) at /Users/evands/adium/Plugins/Gaim Service/ 
> adiumGaimEventloop.m:297
> 	sourceInfo = (struct SourceInfo *) 0xda7e030
> 	user_data = (gpointer) 0xded10b0
> 	c = GAIM_INPUT_WRITE
> 	ioFunction = (GaimInputFunction) 0x8794430 <socket_ready_cb>
> 	fd = 0x18
> #6  0x902c3410 in __CFSocketDoCallback ()
> 
> Note that "bad file descriptor" error message.  I've also seen it 
> say  "Socket operation on non-socket".
> 
> I think something upstream of that command, not inside that command  
> itself, is having a problem.  I don't know the code well enough to  
> guess where... but, as said before, it's something which was created 
>  or revealed by [17165].
> 
> -Evan

The "Bad file descriptor" message seems correct... in step #4 the source is
"0."  0 is a valid file descriptor, but it's pretty much ALWAYS stdin, stdout
or stderr, and I don't think file descriptors are reused.

So for some reason Adium's socket watching stuff is passing in 0 as the file
descriptor, which is probably wrong.  That doesn't necessarily mean it's an
Adium bug, but I can't reproduce this with Gtk Gaim.  Does libgaim print any
debug messages before crashing?

-Mark




More information about the devel mailing list