Bus Error with tk app

M

Mike Wilson

I have a (horribly written) tk app which used to work just fine. I recently
added threading to it, and it now works fine for some period of time, but
then crashses leaving only:

->8-->8--
/usr/local/lib/ruby/1.8/tk.rb:1623: [BUG] Bus Error
ruby 1.8.1 (2003-12-25) [sparc-solaris2.8]

Abort
->8-->8--

The recently modified code is this:
<code>

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)
}
check_status.call
threads.each do |t| t.join end
Tk.mainloop()

</code>

Am I doing something wrong here?

_________________________________________________________________
Get a FREE online computer virus scan from McAfee when you click here.
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Need some thread help 1
Continuation Confusion 1

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top