# (ruby1.9) "irb -r tk" causes SEGV, but "irb -r tcltklib -r tk" doesn't

**URL:** <https://www.ruby-forum.com/t/ruby1-9-irb-r-tk-causes-segv-but-irb-r-tcltklib-r-tk-doesnt/144824>\
**Category:** Development\
**Created:** [August 2, 2008, 7:39pm UTC](https://www.ruby-forum.com/t/ruby1-9-irb-r-tk-causes-segv-but-irb-r-tcltklib-r-tk-doesnt/144824 "2008-08-02T19:39:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Post date:** [August 2, 2008, 7:39pm UTC](https://www.ruby-forum.com/t/ruby1-9-irb-r-tk-causes-segv-but-irb-r-tcltklib-r-tk-doesnt/144824/1 "2008-08-02T19:39:41Z")

</div>

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

e$BJs9p$N$_$G$9$_$^$;$s$,!$I8Bj$N$h$&$Ke(B ruby 1.9 e$B$Ne(B irb  
e$B$Ge(B SEGV e$B$7$^$9!%e(B

e$B2\<5-$N%m%0$N$h$&$K!$e(Birb e$B$N%W%m%s%W%H$+$ie(B “require ‘tk’”  
e$B$re(B  
e$B\<B9T$7$?\>l9g$K$Oe(B SEGV e$B$7$^$;$s!%e(B  
e$B%3%^%s%I%i%$%s0z?t$Ge(B “-r tk” e$B$rIU$1$FFI$\_9~$`$h$&$K$9$k$He(B  
SEGV e$B$7$^$9!%e(B  
e$B$G$9$,!$%3%^%s%I%i%$%s0z?t$re(B “-r tcltklib -r tk”  
e$B$H$$$&$h$&$K$7$F!$e(B  
tk.rb e$B$N@hF,$Ge(B require e$B$7$F$$$ke(B tcltklib.so e$B$re(B  
e$B@h$KFI$\_9~$s$G$\*$/$h$&$K$9$k$HLdBj$J$/F0$-$^$9!%e(B

=======================================================================  
$ ruby19 --version  
ruby 1.9.0 (2008-08-02 revision 0) [i686-linux]  
$ irb19  
irb(main):001:0\> require ‘tk’  
=\> true  
irb(main):002:0\> exit  
$ irb19 -r tcltklib -r tk  
irb(main):001:0\> exit  
$ irb19 -r tk  
/usr/local/lib/ruby/1.9.0/tk/event.rb:451: [BUG] Segmentation fault  
ruby 1.9.0 (2008-08-02 revision 0) [i686-linux]

## – control frame ---------- c:0018 p:---- s:0056 b:0056 l:000055 d:000055 CFUNC :\_define\_attribute\_aliases c:0017 p:2046 s:0052 b:0052 l:002110 d:002110 CLASS /usr/local/lib/ruby/1.9.0/tk/event.rb:451 c:0016 p:0015 s:0049 b:0049 l:000048 d:000048 CLASS /usr/local/lib/ruby/1.9.0/tk/event.rb:16 c:0015 p:0035 s:0047 b:0047 l:000046 d:000046 TOP /usr/local/lib/ruby/1.9.0/tk/event.rb:15 c:0014 p:---- s:0045 b:0045 l:000044 d:000044 FINISH :set\_encoding c:0013 p:0006 s:0043 b:0042 l:000041 d:000041 CLASS /usr/local/lib/ruby/1.9.0/tk.rb:913 c:0012 p:0063 s:0040 b:0040 l:000039 d:000039 TOP /usr/local/lib/ruby/1.9.0/tk.rb:912 c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH :set\_encoding c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :require c:0009 p:0017 s:0025 b:0025 l:000018 d:000024 BLOCK /usr/local/lib/ruby/1.9.0/irb/init.rb:249 c:0008 p:---- s:0024 b:0024 l:000023 d:000023 FINISH :=== c:0007 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :each c:0006 p:0011 s:0019 b:0019 l:000018 d:000018 METHOD /usr/local/lib/ruby/1.9.0/irb/init.rb:247 c:0005 p:0071 s:0015 b:0015 l:000014 d:000014 METHOD /usr/local/lib/ruby/1.9.0/irb/init.rb:20 c:0004 p:0041 s:0011 b:0011 l:000010 d:000010 METHOD /usr/local/lib/ruby/1.9.0/irb.rb:53 c:0003 p:0033 s:0006 b:0006 l:000005 d:000005 TOP /usr/local/bin/irb19:12 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :private\_class\_method c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :17

DBG\> : “/usr/local/lib/ruby/1.9.0/tk/event.rb:451:in  
`_define_attribute_aliases'" DBG> : "/usr/local/lib/ruby/1.9.0/tk/event.rb:451:in`class:Event’”  
DBG\> : “/usr/local/lib/ruby/1.9.0/tk/event.rb:16:in `<module:TkEvent>'" DBG> : "/usr/local/lib/ruby/1.9.0/tk/event.rb:15:in`\<top (required)\>’”  
DBG\> : “/usr/local/lib/ruby/1.9.0/tk.rb:913:in `<module:TkComm>'" DBG> : "/usr/local/lib/ruby/1.9.0/tk.rb:912:in`\<top (required)\>’”  
DBG\> : “/usr/local/lib/ruby/1.9.0/irb/init.rb:249:in `require'" DBG> : "/usr/local/lib/ruby/1.9.0/irb/init.rb:249:in`block in  
load\_modules’”  
DBG\> : “/usr/local/lib/ruby/1.9.0/irb/init.rb:247:in `each'" DBG> : "/usr/local/lib/ruby/1.9.0/irb/init.rb:247:in`load\_modules’”  
DBG\> : “/usr/local/lib/ruby/1.9.0/irb/init.rb:20:in `setup'" DBG> : "/usr/local/lib/ruby/1.9.0/irb.rb:53:in`start’”  
DBG\> : “/usr/local/bin/irb19:12:in `’”  
– backtrace of native function call (Use addr2line) –  
0x80e01b3  
0x810079a  
0x81007c6  
0x80b2f85  
0xb7f3502d  
0xffffe440  
0x80d5143  
0x80d518b  
0x80dee28  
0x80d6905  
0xb7a1ee32  
0x80df3b7  
0x80df509  
0x80ddc5a  
0x80d97ad  
0x80dc7e8  
0x80dcb52  
0x810307b  
0x81038eb  
0x80d052b  
0x80d05b9  
0x80de3e0  
0x80dc0c0  
0x80dc7e8  
0x80dcb52  
0x810307b  
0x81038eb  
0x80df3b7  
0x80df509  
0x80ddc5a  
0x80d97ad  
0x80dc7e8  
0x80d8714  
0x80d6b6a  
0x80e8d57  
0x80df3b7  
0x80df509  
0x80ddc5a  
0x80d97ad  
0x80dc7e8  
0x80dcb52  
0x805a0ed  
0x805a151  
0x8058dc6  
0xb7d9ec1f  
0x8058ce9
