--Boundary-00JtaDksassjOcYD
Content-Type: text/plain;
  charsetso-8859-1"
Content-Transfer-Encoding: 7bit

On Thursday 03 November 2005 19:48, Kevin Brown wrote:
> On Thursday 03 November 2005 18:17, Richard Dale wrote:
> > Kevin Brown wrote:
> > > I started this as a question but figured out the answer while I was
> > > researching, so I'm posting this here for others that may have the same
> > > problem.
> > >
> > > The error I received from my code was as follows:
> > >
> > > (druby://*:9000) /usr/lib/ruby/1.8/drb/drb.rb:375:in `_id2ref':
> > > 0xdbe53cf6 is recycled object (RangeError)
> > >         from (druby://*:9000) /usr/lib/ruby/1.8/drb/drb.rb:375:in
> > > `to_obj' from (druby://*:9000) /usr/lib/ruby/1.8/drb/drb.rb:1343:in
> > > `to_obj' from (druby://*:9000)
> > >         /usr/lib/ruby/1.8/drb/drb.rb:1626:in `to_obj' from
> > >         (druby://*:9000) /usr/lib/ruby/1.8/drb/drb.rb:601:in
> > > `recv_request'
> > >         from (druby://*:9000) /usr/lib/ruby/1.8/drb/drb.rb:899:in
> > > `recv_request'
> > >         from (druby://*:9000) /usr/lib/ruby/1.8/drb/drb.rb:1453:in
> > > `init_with_client'
> > >         from (druby://*:9000) /usr/lib/ruby/1.8/drb/drb.rb:1465:in
> > > `setup_message'
> > >         from (druby://*:9000) /usr/lib/ruby/1.8/drb/drb.rb:1435:in
> > >         `perform'
> > >          ... 22 levels...
> > >         from /usr/local/lib/site_ruby/1.8/Qt/qtruby.rb:1040:in
> > > `method_missing'
> > >         from /usr/local/lib/site_ruby/1.8/Qt/qtruby.rb:1040:in `exec'
> > >         from /usr/local/lib/site_ruby/1.8/KDE/korundum.rb:395:in `exec'
> > >         from ./init.rb:1123
> > > KCrash: Application 'init.rb' crashing...
> > >
> > > This was happening consistantly from the same place in the code.  I
> > > finally tracked down the line that was giving me grief, and the issue
> > > was that I had
> > > a method called Order#id.  When I was running the code without DRb,
> > > this worked just fine, but calling id on a DRb proxy object will get
> > > you its DRb
> > > object id.  I was returning this value, etc.
> > >
> > > I fixed the problem by changing the method name to order_id, so I know
> > > how to avoid the error, but I would still like a little more
> > > explaination as to why exactly this occurred so I can get DRb just that
> > > much clearer in my mind. :-)

Eric, I really REALLY am not trying to point a finger here at ALL, but I guess my question is why did Ruby garbage collect the object consistantly (I mean at least 30 executions in the exact same place)?  Where as now that I've axed all the .id calls it consistantly (at least 100 executions) works now.

Richard and everyone else may also like that I was getting Korundum warnings about Object#id being depracated and to use Object#object_id.  These only showed up when I started using DRb.  This was what made me change the names in the first place, because it was obvious to me that MY code wasn't getting called.  I don't know the Korundum bindings too well, but I'm guessing the Korundum method_missing fired instead of the call being passed across the wire.  Perhaps this was a nasty interaction between the two?  Korundum object id used instead of a DRb object id which later tried to get passed down the wire?  Maybe?  There is a lot of two way communication between the server and client.

Either way, I'm _relatively_ sure that it works now...?

And this is exactly why I posted, because I still don't get it.

I do know how to change the garbage collection method for DRb, but I simply haven't had the need at all, since it consistantly works now (I'll continue to monitor).
--Boundary-00JtaDksassjOcYD--