# Weird problem with soap4r conflict

**URL:** <https://www.ruby-forum.com/t/weird-problem-with-soap4r-conflict/174710>\
**Category:** Ruby-Gnome 2\
**Created:** [August 31, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/weird-problem-with-soap4r-conflict/174710 "2009-08-31T20:07:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Savigear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@Matt\_Savigear](https://www.ruby-forum.com/u/Matt_Savigear)\
**Post date:** [August 31, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/weird-problem-with-soap4r-conflict/174710/1 "2009-08-31T20:07:35Z")

</div>

Hi,

I have a strange problem with a Ruby-GTK application I’m writing. Before  
starting the GUI, I call a web service using soap4r. The code in  
question:

#---------------------------------------------------------------------  
service\_driver=SOAP::RPC::Driver.new(svc\_addr,‘urn:RGUIAuthenticator’)  
service\_driver.add\_method(‘authenticate’, ‘username’, ‘password’)  
auth\_token = service\_driver.authenticate(uname, passwd)  
service\_driver = nil

create\_gui() # Just creates a Gtk::Window with one button  
Gtk.main  
#---------------------------------------------------------------------

The symptoms: At the Gtk.main call the window appears but is not painted  
for about 30 seconds, during which my CPU usage runs up to 97% or so.  
The event attached to the unpainted button is still fired on a click so  
the loop isn’t actually hung. Once the 30 seconds of high-cpu usage  
ends, the window content is painted in.

A window created before the web service is fired works fine, and if I  
comment out the actual service call line everything goes back to normal.

Can anyone suggest why this conflict might be happening and remedy it?  
I’ve tried putting the web service call into its own thread to no avail.

–  
Thanks,

Matt.
