Re: [gnet] free heap block



On Wed, 2004-08-04 at 05:08 -0300, Daniel K. O. wrote:

> erich steiger wrote:

> >i've compiled and run the example echoserver_gserver.c under win32 using
> >visual studio.
> >(...)
> >why does this occure? is this a failer? do i need anything else to freeing
> >memory to prevent this?

>  From my last experiences with GNet on Win32, this looks like a common 
> bug in the Win32 code. GNet even inherits bugs from GIOChannel (udp/tcp 
> ports opening and never closing again), but the more serious are the 
> gratuitous BSODs.
> I once needed a reliable way to use sockets on a GTK+ app 
> (winlop.sf.net), and tried to use GNet; it was less stable (the Win32 
> version) at that time, and I had almost no experience with Winsock so I 
> gave up. At the end I had to make a dirty workaround 
> (src/lopster_input.c, if you guys wanna laugh at me a little) without 
> using GNet at all, but it would be great if I could use it (even now).
> 
> IMHO, the main problem (at that time, maybe it's still present) is that 
> there's too much #ifdef's; the Win32 version looks almost like a 
> separated library, and looks like the author isn't able to keep the 
> Win32 code updated with the unix version. Would be nice if we could get 
> some more Winsock programmers to help a bit.
> 
> My recommendation is: get the GNet sources and try to find any 
> suspicious code; also try to find a winsock programmer to review the 
> library code; oh yes, go get yourself a Linux distro, GNet works very 
> well there. :D

Make sure you're linking to the correct version of msvcrt. GLib, GNet
and your application need to link to the same one - i.e. same threading
and debug settings. Examine your linked app with a DLL browser. This bit
me when I first tried to port an app to win32.

Additionally, I can confirm that the current GLib GIOChannel code has
threading problems on win32 that makes it almost useless. There's a bug
open for it in GNOME Bugzilla, indicating that the maintainers would
like to make a rewrite.

--
Hans Petter




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