Hi, 

From: "Mike Wilson" <wmwilson01 / hotmail.com>
Subject: Re: Bus Error with tk app
Date: Sat, 6 Mar 2004 04:36:44 +0900
Message-ID: <BAY15-F55g91Blas0pg00007d22 / hotmail.com>
> Is this a bug?

Probably. But I cannot do enough test your script because I don't 
have a solaris environment and the shown code is only a part. I 
couldn't reproduce your problem on my Linux environment (your 
snipped parts are replaced to print messages).

Which version of Tcl/Tk do you use?
Is your ruby (and Tcl/Tk) compiled with thread support?
Do you get same result when use TkTimer class?
For example, 
------------------------------------------
threads = []
check_status = proc {
    threads.clear
    $labels.each_key do |aHost|
        threads << Thread.new(aHost) do |host|
            if $look[host] == 1
                if system("ping #{host} 4 > /dev/null 2>&1")
                    ...snip...
                else
                    ...snip...
                end
            end
        end
    end
    updater.configure('text' => "Last update: " + Time.new.strftime(DATE_FORMAT + ":%S"))
    # Tk.after(tknm_interval, &check_status) --> remove this line
}
# check_status.call
# threads.each do |t| t.join end
TkTimer.new(tknm_interval, -1, check_status).start
Tk.mainloop()
------------------------------------------
Please read tktimer2.rb or tktimer3.rb on ext/tk/sample directory of 
Ruby soruce archive. 

I'm trying to fix some known problems at the same time to fixing the 
problem of exporting/inporting binary (with null byte) string to the 
Tk interpreter. I think the trouble depends on thread switching when 
doing operations having interaction between ruby and tk interpreter. 
It may be a sensitive issue (especially involving POSIX threads). 

I'm busy now and don't have enough time to work on the problems. 
So, it will be difficult to fix the problems over the next few weeks 
(Maybe I cannot fix completely without many helps). As if I cannot 
fix completely, I endeavor to improve Ruby/Tk and to release the trial 
version of patch in a few weeks. 
-- 
                                  Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)