From: Wybo Dekker <wybo / servalys.nl>
Subject: Re: segfault with tk.rb
Date: Wed, 29 Mar 2006 17:43:43 +0900
Message-ID: <Pine.LNX.4.64.0603291033430.8945 / servalys.nl>
> what would you suggest me to do?

Oh, I'm sorry. 
SEGV trouble on Ruby/Tk depends on tcltklib.so. 
# Of course, if the trouble realy depends on Ruby/Tk. ;-)
To check the reason, information of your environment 
(OS, nativethread suuport, library verion, and so on) are required.

If you can, please report the followings.

# If you can also, please try the latest tcltklib.

  * ruby version
  * configure options
  * result of 'ruby -r tk -e 'p Tk::TK_PATCHLEVEL; p Tk::PLATFORM'
  * [depends on your OS] result of ldd your 'ruby' and 'tcltklib.so'
      e.g. $ ldd /usr/local/lib/ruby/1.8/i686-linux/tcltklib.so
           linux-gate.so.1 =>  (0xffffe000)
           libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7e3d000)
           libdl.so.2 => /lib/libdl.so.2 (0xb7e2c000)
           libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb7ddb000)
           libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7dae000)
           libm.so.6 => /lib/i686/libm.so.6 (0xb7d8b000)
           libc.so.6 => /lib/i686/libc.so.6 (0xb7c51000)
           /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
  * information which you think useful to solve the trouble :-)

Anyway, the follwoing wraning and error are expecetd. 
Those have no problem, but the exception may cause SEGV.
However, I think such troubles on exception are fixed on ruby 1.8.3 
or later. If no case of troubles is escaped notice.

From: Wybo Dekker <wybo / servalys.nl>
Subject: Re: segfault with tk.rb
Date: Wed, 29 Mar 2006 17:43:43 +0900
Message-ID: <Pine.LNX.4.64.0603291033430.8945 / servalys.nl>
> $ ruby -rdebug t
> Debug.rb
> Emacs support available.
> 
> t:3:require 'tk'
> (rdb:1) c
> /usr/local/lib/ruby/1.8/tk.rb:2313: warning: redefine encoding=
> /usr/local/lib/ruby/1.8/tk.rb:2316: warning: redefine encoding
> /usr/local/lib/ruby/1.8/tk/variable.rb:290: `can't unset "v00000": no
> such variable' (RuntimeError)
>          from /usr/local/lib/ruby/1.8/tk/variable.rb:290:in `initialize'
>          from t:11
> /usr/local/lib/ruby/1.8/tk/variable.rb:290:
> INTERP._unset_global_var(@id)
-- 
Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)