K
Kevin Brown
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.
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.