Re: [gnet-dev] Cross-compiling gnet for win32 from linux
- From: "ben levitt" <benjie gmail com>
- To: Gorshkov <listsubscriptions oghma on ca>
- Cc: gnet-dev lists gnetlibrary org
- Subject: Re: [gnet-dev] Cross-compiling gnet for win32 from linux
- Date: Mon, 13 Mar 2006 12:32:48 -0800
Just to confirm that this is truly a gnet vs. glib/gtk bug, I submit
the following:
I took echoserver-async.c and echoclient-async.c, and added an empty
gtk window to each app, and a timeout to send "Ping!" from the client
to the server every 1000ms.
When I run my `pingserver-async.exe 2000` and `pingclient-async.exe
localhost 2000`, and move the server window while a "Ping!" comes in,
I get the same crashing behavior.
My test code is here:
http://benjie.org/software/pingserver-async.c
http://benjie.org/software/pingclient-async.c
Is there anything I should be doing differently? Are there any ideas
on how to work around or fix this? Should I take this to the gtk dev
list?
Thanks,
Ben
On 3/7/06, Gorshkov <listsubscriptions oghma on ca> wrote:
> On Tuesday 07 March 2006 14:44, ben levitt wrote:
> > Well, I now have cvs gnet compiling for windows, and my gtkmm app
> > compiling with this gnet. Everything now basically works (yay!), but
> > I have a very strange bug.
> >
>
> Why did I know what you were going to say next as soon as I saw this .....
>
> > My app runs a command-line server and some gui clients. I'm using
> > gnet tcp sockets. I'm building and running with gtkmm as installed by
> > the 2.8.3 installers.
> >
> > On each client, I set up a watch like this:
> > g_io_add_watch (io_channel,
> > (GIOCondition)(G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL),
> > &handle_event, data);
> >
> > If I drag a client's window accross the screen while gnet is
> > communicating, hadle_event gets called with cond=0, and this client
> > gets disconnected from the server. This doesn't happen in a linux
> > build, only in windows. (My code is not doing anything
> > network-related on window movement, resizing, redrawing, etc)
> >
> > I'm thinking this could have something to do with gnet events and
> > window movement events brawling in glib's main loop. But I haven't
> > gone digging into glib at all yet. (Hoping not to...)
> >
> > Does this sound familiar to anyone? Any idea what I could be doing
> > wrong, or how I could fix/work around this? Or if it might be a
> > gnet/glib bug?
> >
>
> Yes, it sounds very familiar .... I ran into this myself not more than a month
> ago. The problem is, in fact, an interaction between glib/gtk/something there
> and gnet. I asked on the gtk-app-dev list, and all I got for asking about it
> was that my code was probably buggy because I must have written it in C ....
> not the most helpfull answer I ever found.
>
> I eliminated the problem by dropping gnet, and using the windows network APi
> nativly, porting a simple connection library I had written years ago - I
> think it took a grand total of a half hour.
>
> Basically, the native windows calls are based on the berkly sockets library,
> os if you'e done any network programming under unix/linux
> (socket/connect/send/receive et al), it's a trivial problem to write your
> own.
>
> Hope this helps
>
>
> CAVEAT: I *like* the gnet library, and would love to be using it ..... but
> given the interactions, it was easier to do without it than it was gtk.
> > Thanks!
> >
> > Ben
> > _______________________________________________
> > gnet-dev mailing list
> > gnet-dev lists gnetlibrary org
> > http://lists.gnetlibrary.org/mailman/listinfo/gnet-dev
> _______________________________________________
> gnet-dev mailing list
> gnet-dev lists gnetlibrary org
> http://lists.gnetlibrary.org/mailman/listinfo/gnet-dev
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]