bus error in gtknotebook.c:945
- From: Sebastian Wilhelmi <wilhelmi ira uka de>
- To: gtk-list redhat com
- Subject: bus error in gtknotebook.c:945
- Date: Wed, 03 Dec 1997 17:52:33 +0100
Hi,
I've compiled gtk+-971201 on a 'SunOS 5.5.1 Generic sun4m' with
'gcc version 2.7.2.2'
It works quite fine, but there is an anoying bug, which I hereby want to
report:
if you press inside a notebook (i.e. the page of a notebook) and there
is for instance a label, than a bus error is signaled and of course a
core dumped.
So if I debug this, the problem occurs in line 945 of the file
gtknotebook.c:
921 static gint
922 gtk_notebook_button_press (GtkWidget *widget,
923 GdkEventButton *event)
924 {
925 GtkNotebook *notebook;
926 GtkNotebookPage *page;
927 GList *children;
928
929 g_return_val_if_fail (widget != NULL, FALSE);
930 g_return_val_if_fail (GTK_IS_NOTEBOOK (widget), FALSE);
931 g_return_val_if_fail (event != NULL, FALSE);
932
933 if ((event->type != GDK_BUTTON_PRESS) ||
934 (event->window != widget->window))
935 return FALSE;
936
937 notebook = GTK_NOTEBOOK (widget);
938
939 children = notebook->children;
940 while (children)
941 {
942 page = children->data;
943 children = children->next;
944
945 if (GTK_WIDGET_VISIBLE (page->child) &&
946 (event->x >= page->allocation.x) &&
947 (event->y >= page->allocation.y) &&
948 (event->x <= (page->allocation.x +
page->allocation.width)) &&
949 (event->y <= (page->allocation.y +
page->allocation.height)))
950 {
951 gtk_notebook_switch_page (notebook, page);
952 break;
953 }
954 }
955
956 return FALSE;
957 }
Now the funny thing. If I set a breakpoint at the start of the function
and move through the code with "next" in gdb, everything works fine, but
If I just press "cont", it dumps core again. So It seems to me like a
timimg problem, but is there another thread writing things somewhere? (i
dont think so.)
So, this might of course as well be a gcc- or sunos-bug.
I'm sorry, but I cant do anything about it. I hope, some of you guys
can.
BTW: If I bind a function to the event "release" of a button and do a
gtk_button_set_sensitive( button, 0 ) in this function, then the
backgroundcolor of the button isn't restored properly. Something similar
applies to the focus. If I bind a function to the event "focus_in" (?sp)
and do a grab_focus on another widget in this function, the old widget
stills looks like having the focus (is kind of sunken).
If those weren't bugs, but only my misunderstanding, then please ignore
this (or even better, write me, how such things should be implemented in
gtk)
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]