possible bug in gtk--??????
- From: Sebastian Wilhelmi <wilhelmi ira uka de>
- To: gtk-list redhat com
- Subject: possible bug in gtk--??????
- Date: Wed, 24 Jun 1998 14:48:23 +0200
Hi,
if I compile the following program (with Gtk---0.9.8 and gtk+-1.0.4), I
get a warning, that seems to be inevitable.
First the code:
#include <gtk--.h>
int main(int argc, char *argv[])
{
Gtk_Main Main(&argc,&argv);
Gtk_Window Window;
Gtk_Button Button( "test" );
connect_to_method( Button.released, (Gtk_Widget*)&Button,
&Gtk_Button::set_sensitive, false );
Window.add( &Button );
Button.show();
Window.show();
Main.run();
}
If I now press the button, I get:
** WARNING **: invalid cast from (NULL) pointer to `GtkObject'
** WARNING **: file gtkobject.c: line 1139 (gtk_object_get_data_by_id):
"object != NULL"
The corresponding trace is:
#0 gtk_object_get_data_by_id (object=0x0, data_id=103) at
gtkobject.c:1139
#1 0xef5ee064 in gtk_object_get_data (object=0x0, key=0x0) at
gtkobject.c:1166
#2 0xef722684 in Gtk_Window::set_focus_c_callback (o=0xeffff1c0,
p1=0x0) at ./../window.gen_h:58
#3 0xef63dd64 in gtk_window_marshal_signal_2 (object=0x312b8,
func=0xef7225b4 <Gtk_Window::set_focus_c_callback(_GtkWindow *,
_GtkWidget *)>, func_data=0x0, args=0xefffdad8) at gtkwindow.c:500
#4 0xef607544 in gtk_signal_real_emit (object=0x312b8, signal=0x2b918,
params=0xefffdad8) at gtksignal.c:1409
The problem is the p1=0x0 in #2, which is caused by #4 (calling #3 with
func_data=0x0), which is hardcoded there....
If I remember right, that hasn't happend with earlier versions of gtk--
Bye
Sebastian
--
+--------------============##################============--------------+
| Sebastian Wilhelmi, Institut fuer Rechnerentwurf und Fehlertoleranz, |
| Universitaet Karlsruhe; Gebaeude 20.20, Raum 263, D-76128 Karlsruhe |
| mail: wilhelmi@ira.uka.de; fax: +49 721 370455; fon: +49 721 6084353 |
+----------------> http://goethe.ira.uka.de/~wilhelmi <----------------+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]