Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#977) Extended connect dialog
Home

[Freeciv-Dev] (PR#977) Extended connect dialog

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: dspeyer@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#977) Extended connect dialog
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Mon, 26 Jan 2004 10:24:01 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=977 >

> [kauf - Sat Jan 17 20:26:29 2004]:
> 
> There is a bug: (well there are probably several, but this one is fairly
> easy to find) starting an independent server and then connecting to it via
> the "connect to network game" is fine, but if you then quit the server you
> get this in the client:
> 
> 2: lost connection to server
> 
> (civclient:22233): Gtk-CRITICAL **: file gtkwidget.c: line 3065
> (gtk_widget_event): assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)'
> failed
> 
> maybe Vasc can help here.

This is similar to the bug the nation selection dialog used to have. The
problem is with the toggle buttons. You should not attach signal
handlers for toggled events until the button group has been built,
otherwise you will catch many spurious events you really don't want to
catch. You will also catch toggle events when the widgets are being
destroyed. So be sure to destroy the signal handlers before destroying
the button group itself.

Try commenting all the g_signal_connect's with radio_command_callback as
the callback function in gui_server_connect. Add this line in
gui_server_connect:

next_page = NETWORK_PAGE;

To make sure the network page will be selected when you click the "Next"
button to reproduce your conditions. You will see all the gtk-criticals
vanish.

I leave the bug fix to you Mike. :-)

PS: The gtk-criticals are triggered inside the GTK+ loop. This would
have made the bug extremely hard to trace, but since I had the
aforementioned experience of problems with toggle buttons groups, I
found the bug in about 2 minutes.



[Prev in Thread] Current Thread [Next in Thread]