GTK 1.2.3 crash



I thought the newest release of GTK is maybe stable enough to compile it
with proper optimization. But it seems it is not.

System: Solaris 7, UltraSPARC II processor, X11R6, displayed remotely via ssh
to another Solaris 7 with the Creator graphics card, 24bpp default visual.

CC = cc (Sun's, version 5.0)
CFLAGS = -xO4 -xchip=ultra -xarch=v8plusa -xdepend -xprefetch=yes -dalign
LIBS = -lfast

With this compiler setting, testgtk repeatedly crashes. To repeat:

./testgtk

Click on file selection dialog, click on close, click on font selection
dialog, crash.

That was the first test I tried. :-) I tried some more tests, but the
only thing that crashes it seems to be (file selection) -> (arbitrary
number of other tests, but none actually needed) -> (font selection).

Then I tried to compile glib with less optimization.
CFLAGS = -xO3 -xchip=ultra -xarch=v8plus -xprefetch=yes
LIBS =

I got the crash again. Then I compiled GTK with the same flags and it
didn't crash any more. The difference is:

-xO4 vs. -xO3 -- will make compiler inline what it sees fit
-xarch=v8plus vs. -xarch=v8plusa -- the first one uses UltraSPARC specific
   instructions, the second includes Visual Instruction Set, as well
-xdepend -- performs loop restructuring
-dalign -- includes 8 byte load/store instruction, but all long long
   and double data must be double-word aligned
-lfast -- includes library which will replace some libc functions
   with the faster ones which also expect data to be double-word
   aligned

Since testgtk crashed with SIGBUS, it means that the problem is in
misaligned data. This also means that it will crash if compiled in
64-bit mode, with or without special optimization flags. So I tried to
compile it with CFLAGS="-g -dalign", but it didn't crash. Then I added
-lfast and it crashed. This library comes with the compiler and only
statical version is available. Linking process was complaining somewhat
about it, so I don't know if this is the problem. I don't think so.

But, -lfast carries it's own version of malloc() and friends, which
are not forgiving at all, unlike the versions in libc. There is a number of
GDK varnings prior to crashing, available in the first attachment.
Stack backtrace is in the attachement 2.

I can't say if other things (or their combination) will produce crash.

-- 
 .-.   .-.    Life is a sexually transmitted disease.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.cc.fer.hr
Gtk-CRITICAL **: file gtktypeutils.c: line 313: assertion `node != NULL' failed.

Gtk-WARNING **: invalid cast from `(unknown)' to `GtkObject'

Gtk-WARNING **: invalid cast from `(unknown)' to `GtkObject'

Gtk-CRITICAL **: file gtkclist.c: line 992: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkwidget.c: line 3732: assertion `GTK_IS_WIDGET (widget)'
 failed.

Gtk-CRITICAL **: file gtkclist.c: line 1198: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 1286: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 1633: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkcontainer.c: line 707: assertion `GTK_IS_WIDGET (widget)' failed.

Gtk-CRITICAL **: file gtkwidget.c: line 1435: assertion `GTK_IS_WIDGET (widget)' failed.

Gtk-WARNING **: invalid cast from `(unknown)' to `GtkObject'

Gtk-CRITICAL **: file gtksignal.c: line 725: assertion `GTK_IS_OBJECT (object)' failed.

Gtk-WARNING **: invalid cast from `(unknown)' to `GtkObject'

Gtk-CRITICAL **: file gtksignal.c: line 725: assertion `GTK_IS_OBJECT (object)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 1230: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 2569: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 2569: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 3007: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 2569: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 3007: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 2569: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 3007: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 3411: assertion `GTK_IS_CLIST (clist)' failed.

Gtk-CRITICAL **: file gtkclist.c: line 1239: assertion `GTK_IS_CLIST (clist)' failed.
zsh: bus error (core dumped)  ./testgtk
program terminated by signal BUS (invalid address alignment)
Current function is gtk_type_new
  374       tobject = g_malloc0 (node->type_info.object_size);

> where

  [1] malloc(0x8df0c, 0xfc, 0x148950, 0x1, 0xffbedec8, 0x8), at 0x494c4
  [2] calloc(0xfc, 0x1, 0xfc, 0x0, 0xffbedec8, 0x0), at 0xfecb9a9c
  [3] g_malloc0(0xfc, 0xfefec334, 0xfc, 0x0, 0x0, 0xffbedc38), at 0xfefc2d78
=>[4] gtk_type_new(type = 45845U), line 374 in "gtktypeutils.c"
  [5] gtk_clist_new_with_titles(columns = 1, titles = (nil)), line 1063 in "gtkclist.c"
  [6] gtk_clist_new(columns = 1), line 1054 in "gtkclist.c"
  [7] gtk_font_selection_init(fontsel = 0xcbce0), line 841 in "gtkfontsel.c"
  [8] gtk_type_new(type = 48661U), line 403 in "gtktypeutils.c"
  [9] gtk_font_selection_new(), line 926 in "gtkfontsel.c"
  [10] gtk_font_selection_dialog_init(fontseldiag = 0x140000), line 3453 in "gtkfontsel.c"
  [11] gtk_type_new(type = 48149U), line 403 in "gtktypeutils.c"
  [12] gtk_font_selection_dialog_new(title = 0x77ff0 "Font Selection Dialog"), line 3494 in "gtkfontsel.c"
  [13] create_font_selection(), line 5153 in "testgtk.c"
  [14] gtk_marshal_NONE__NONE(object = 0x131330, func = 0x35738 = &create_font_selection(), func_data = (nil), args = 0xffbee6b0), line 364 in "gtkmarshal.c"
  [15] gtk_handlers_run(handlers = 0x133620, signal = 0xffbee61c, object = 0x131330, params = 0xffbee6b0, after = 0), line 1912 in "gtksignal.c"
  [16] gtk_signal_real_emit(object = 0x131330, signal_id = 67U, params = 0xffbee6b0), line 1469 in "gtksignal.c"
  [17] gtk_signal_emit(object = 0x131330, signal_id = 67U, ...), line 552 in "gtksignal.c"
  [18] gtk_button_clicked(button = 0x131330), line 338 in "gtkbutton.c"
  [19] gtk_real_button_released(button = 0x131330), line 852 in "gtkbutton.c"
  [20] gtk_marshal_NONE__NONE(object = 0x131330, func = 0xff092918 = &`libgtk-1.2.so.0`gtkbutton.c`gtk_real_button_released(struct _GtkButton *button), func_data = (nil), args = 0xffbeec18), line 364 in "gtkmarshal.c"
  [21] gtk_signal_real_emit(object = 0x131330, signal_id = 66U, params = 0xffbee
c18), line 1432 in "gtksignal.c"
  [22] gtk_signal_emit(object = 0x131330, signal_id = 66U, ...), line 552 in "gtksignal.c"
  [23] gtk_button_released(button = 0x131330), line 329 in "gtkbutton.c"
  [24] gtk_button_button_release(widget = 0x131330, event = 0xc6018), line 712 in "gtkbutton.c"
  [25] gtk_marshal_BOOL__POINTER(object = 0x131330, func = 0xff0917d0 = &`libgtk-1.2.so.0`gtkbutton.c`gtk_button_button_release(struct _GtkWidget *widget, struct _GdkEventButton *event), func_data = (nil), args = 0xffbef188), line 34 in "gtkmarshal.c"
  [26] gtk_signal_real_emit(object = 0x131330, signal_id = 21U, params = 0xffbef188), line 1484 in "gtksignal.c"
  [27] gtk_signal_emit(object = 0x131330, signal_id = 21U, ...), line 552 in "gtksignal.c"
  [28] gtk_widget_event(widget = 0x131330, event = 0xc6018), line 2790 in "gtkwidget.c"
  [29] gtk_propagate_event(widget = 0x131330, event = 0xc6018), line 1296 in "gtkmain.c"
  [30] gtk_main_do_event(event = 0xc6018), line 753 in "gtkmain.c"
  [31] gdk_event_dispatch(source_data = (nil), current_time = 0xffbef768, user_data = (nil)), line 2098 in "gdkevents.c"
  [32] g_main_dispatch(0xfefee4f8, 0xfefee4e4, 0xfefee4e8, 0x0, 0xfefee428, 0xfffffffd), at 0xfefc0c74
  [33] g_main_iterate(0xfefee4ec, 0xfefee4f0, 0xfefee458, 0xfefee4e4, 0xfefee4e8, 0xfefec334), at 0xfefc13a4
  [34] g_main_run(0x1, 0xa4c40, 0x0, 0xfefee4e8, 0xfefec334, 0x0), at 0xfefc158c
  [35] gtk_main(), line 475 in "gtkmain.c"
  [36] main(argc = 1, argv = 0xffbef91c), line 8374 in "testgtk.c"


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