From: Kero van Gelder Date: 2001-09-05T08:48:18+09:00 Subject: [ruby-talk:20899] Re: Ruby/Tk core dump > Here's what gets printed when it dumps the core ... > > /usr/other/csus/pub/lib/ruby/1.6/tk.rb:470: [BUG] Bus Error > ruby 1.6.4 (2001-06-04) [sparc-solaris2.6] > Abort (core dumped) > > .... and here's a stack traceback from gdb when looking at the core > > #0 0xdf748244 in _libc_kill () from /usr/lib/libc.so.1 > #1 0xdf6fa608 in abort () from /usr/lib/libc.so.1 > #2 0x310c4 in rb_check_type (x=769552, t=43) at error.c:178 > > Any idea what's wrong or do you need more info. From tk.rb, line 470 seems > to be where it attempts to talk to the Tk library (looks like it's running > some Tcl code, maybe?). It's a rather complex line that says ... > > INTERP._invoke("proc", "rb_out", "args", "if {[set st [catch {ruby > [format \"TkCore.callback %%Q!%s!\" $args]} ret]] != 0} {if {[regsub -all > {!} $args {\\!} newargs] == 0} {return -code $st $ret} {if {[set st [catch > {ruby [format \"TkCore.callback %%Q!%s!\" $newargs]} ret]] != 0} {return > -code $st $ret} {return $ret}}} {return $ret}") Hm, you're not trying Thread.new() { Tk.mainloop() } are you? Instead, try Thread.new() { # your other stuff } and ask matz or the other guy that wrote the Tk bindings why it matters (I couldn't understand the code at first and second glance). PS: the huge line is about callback/event from the Tk side of your program. +--- Kero ------------------------------ kero@chello.nl ---+ | Don't split your mentality without thinking twice | | Proud like a God -- Guano Apes | +--- M38c ------- http://members.chello.nl/~k.vangelder ---+