(solution) Re: gtk_widget_show() crashes with GTK Entry on Ubuntu Dapper



Sylvain Vedrenne wrote:
Hi,

This GTK Entry example from the tutorial crashes on gtk_widget_show() on
Ubuntu Dapper:
http://www.gtk.org/tutorial/x941.html

I got this problem with GTKmm, so I tried using GTK+. Same result with
GTK+: a crash on gtk_widget_show().

Actually I'm not certain it's a GTK+ problem; please pardon me if it is
not. In case you know what is wrong, I will very much appreciate some help.

Here is the backtrace:

GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db
library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /home/sylvain/src/guis/gtk/entry

Program received signal SIGSEGV, Segmentation fault.
0xb52941a3 in __gnu_cxx::__mt_alloc<scim::Pointer<scim::SlotNode>,
__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::allocate (
    this=0x81af054, __n=1) at mt_allocator.h:719
719     mt_allocator.h: No such file or directory.
        in mt_allocator.h
Current language:  auto; currently c++
(gdb) backtrace
#0  0xb52941a3 in __gnu_cxx::__mt_alloc<scim::Pointer<scim::SlotNode>,
__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::allocate
    (this=0x81af054, __n=1) at mt_allocator.h:719
#1  0xb5294595 in std::vector<scim::Pointer<scim::SlotNode>,
std::allocator<scim::Pointer<scim::SlotNode> > >::_M_insert_aux (
    this=0x81af054, __position={_M_current = 0x0}, __x= 0xbfb38268) at
stl_vector.h:117
#2  0xb5293f03 in scim::Signal::connect (this=0x81af050, slot=0x81c57e0)
at stl_vector.h:610
#3  0xb5290c19 in scim::PanelClient::signal_connect_lookup_table_page_up
(this=0x81dcac0, slot=0x81c57e0) at scim_signals.h:351
#4  0xb5311a21 in gtk_im_context_scim_new () from
/usr/lib/gtk-2.0/2.4.0/immodules/im-scim.so
#5  0xb7992913 in g_type_class_ref () from /usr/lib/libgobject-2.0.so.0
#6  0xb797a8a7 in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#7  0xb797aca5 in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0
#8  0xb797ae4e in g_object_new () from /usr/lib/libgobject-2.0.so.0
#9  0xb530a98b in gtk_im_context_scim_new () from
/usr/lib/gtk-2.0/2.4.0/immodules/im-scim.so
#10 0xb5318c50 in im_module_create () from
/usr/lib/gtk-2.0/2.4.0/immodules/im-scim.so
#11 0xb7d42cd1 in _gtk_im_module_create () from /usr/lib/libgtk-x11-2.0.so.0
#12 0xb7d4349c in gtk_im_multicontext_new () from
/usr/lib/libgtk-x11-2.0.so.0
#13 0xb7d434ff in gtk_im_multicontext_new () from
/usr/lib/libgtk-x11-2.0.so.0
#14 0xb7d413ce in gtk_im_context_set_client_window () from
/usr/lib/libgtk-x11-2.0.so.0
#15 0xb7cefc99 in gtk_entry_get_text () from /usr/lib/libgtk-x11-2.0.so.0
#16 0xb7980423 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
#17 0xb797416f in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#18 0xb797479f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#19 0xb79835cc in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#20 0xb7984b19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#21 0xb7984e89 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#22 0xb7e453d1 in gtk_widget_realize () from /usr/lib/libgtk-x11-2.0.so.0
#23 0xb7e4558f in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#24 0xb7cd54a7 in gtk_container_get_focus_hadjustment () from
/usr/lib/libgtk-x11-2.0.so.0
#25 0xb7c9afd8 in gtk_box_reorder_child () from /usr/lib/libgtk-x11-2.0.so.0
#26 0xb7cd3c36 in gtk_container_forall () from /usr/lib/libgtk-x11-2.0.so.0
#27 0xb7cd54e0 in gtk_container_get_focus_hadjustment () from
/usr/lib/libgtk-x11-2.0.so.0
#28 0xb7980423 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
#29 0xb797416f in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#30 0xb797479f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#31 0xb79835cc in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#32 0xb7984b19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#33 0xb7984e89 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#34 0xb7e45530 in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#35 0xb7e4ee55 in gtk_window_reshow_with_initial_size () from
/usr/lib/libgtk-x11-2.0.so.0
#36 0xb7980423 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#37 0xb797416f in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#38 0xb797479f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#39 0xb79835cc in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#40 0xb7984b19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#41 0xb7984e89 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#42 0xb7e45530 in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#43 0xb7e5103e in gtk_window_get_position () from
/usr/lib/libgtk-x11-2.0.so.0
#44 0xb7980423 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
#45 0xb797416f in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#46 0xb797479f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#47 0xb79835cc in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#48 0xb7984b19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#49 0xb7984e89 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#50 0xb7e45cc6 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#51 0x0804945a in main (argc=1, argv=0xbfb39ea4) at entry.c:94
(gdb)

Regards,

N.B: seems to be a problem with scim (I'm using scim 1.4.4):

=== Bug report here:

  http://sourceforge.net/mailarchive/message.php?msg_id=17137051

=== Solution

  1) download the sources of scim-1.4.4
  2) scim-1.4.4$ ./configure --enable-ld-version-script && make
  && sudo make install
  3) Retry running the GTK Entry tutorial example: it doesn't crash
  anymore. Ok as well using the equivalent GTKmm example.

Rgds,
-- 
GNU/Sylvain
http://sylvano.esperanto.free.fr



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