Well,
I wrote a small gtk-ruby client for communicating to a server(which
handles some home grown protocol), basically… i have couple of
threads that keep reading from sockets and I am synchronizing
Gtk::TextBuffer as shown below.
def read_from_control_socket
@threads << Thread.new do
loop do
data = nil
data = @control_socket.gets
next if data.nil? or data.empty?
@text_buffer.synchronize do
@text_buffer.insert(@text_iter,data)
end
end # end of loop dp
end # end of thread loop
end # end of read_from_control_socket
Above code was working remarkably well and its just a prototype of a
client, which i use to test certain requests manually and hence I
didn’t spend much time optimising stuff.
But, I guess after some ubuntu update, whole program partially broke
and often i get this
segmentation fault:
/usr/local/lib/ruby/site_ruby/1.8/libglade2.rb:105: [BUG] Segmentation
fault
ruby 1.8.5 (2006-12-25) [i686-linux]
Aborted
Also, I had a callback that i used to use to clear textbuffer and damn
thing now throws this, when signalled:
tick_ui.rb:346: warning: GRClosure invoking callback: already destroyed
The callback is something like this:
def on_clear_result_view_clicked
@text_buffer.synchronize do
@text_buffer.text = “”
@text_iter = @text_buffer.end_iter
end
@symbol_entry.grab_focus
end
Any ideas, why?
–
gnufied
There was only one Road; that it was like a great river: its springs
were at every doorstep, and every path was its tributary.
http://people.inxsasia.com/~hemant
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642