[gnet] RE: [gnet-dev] gnet_tcp_socket_connect_async() fails.



> 
> David Helder wrote:
> 
> >It looks correct.  Did you try debugging it?  What system 
> are you using?
> >What version of GLib?
> >
> glib version 2.0.6 (which comes with the redhat 8.0 build)
> 
> yea i did try debugging it, im not at work atm, I will send u 
> a bt from 
> gdb in the morning.
> the funny thing was i tried it both ways (synchronously to, 
> by setting 
> up the inetaddr as by the example in hfetch.c).
> 
> i'm sure this is something to do with not initialising a module 
> somewhere, or not linking against something? i didnt originally link 
> against gthread and that solved a problem.  i am currently linking 
> against glib and gthread, are there others i should link against?
> 


Below is gdb's BT:

This GDB was configured as "i386-redhat-linux"...
(gdb) run
Starting program: /home/russelm6/projects/mjr/gnet-test/Linux2gcc/gnet-test
[New Thread 8192 (LWP 13821)]
Message: initiated GNET
Message: using server:'216.239.33.101'
Message: using port:80
Message: connect: connecting to host:'216.239.33.101', port:80 with
cb:0x080487d6
[New Thread 16385 (LWP 13822)]
[New Thread 8194 (LWP 13823)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 8192 (LWP 13821)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x400d6bfa in g_thread_self () from /usr/lib/libglib-2.0.so.0
#2  0x400bf87c in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#3  0x08048711 in main (argc=1, argv=0xbfffee84) at main.c:52
#4  0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)


I noticed it wasn't doing it when NOT running the mainloop but that is
probably because the error has not happened at that point and it exits while
waiting asynchronously.  Also - incase you were interested, the IP address
points to www.google.com

Also, does gnet **HAVE** to use threading? I would rather any application I
build NOT use threading unless ABSOLUTELY necessary!


Regards,
Martyn



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