On Fri, 15 Aug 2003 01:57:18 +0900 matz / ruby-lang.org (Yukihiro Matsumoto) wrote: > Hi, > > In message "_id2ref bug?" > on 03/08/15, Ryan Pavlik <rpav / users.sf.net> writes: > > |While debugging some caching code, I've come across a segfault related > |to ObjectSpace::_id2ref. Apparently it's returning illegal objects: > | > | Remote Exception: NotImplementedError: > | /usr/local/encap/mephle-0.8.0/share/mephle/Driver/Storage_cache.rb:49:in > | `cache': method `_oid' called on terminated object (0x4043a568) > > We can't say much without error reproducing code. Can you disclose > it? Actually, I really want to say "don't use _id2ref", but you've > said it's not an option. The main problem is the codebase is pretty big. I can probably come up with a working example, but it's not going to be small. The reason for using _id2ref is to make sure that there's 1 unique copy of an object in existance. If other objects have a reference to something, I have to use the existing reference. So _id2ref is necessary here, AFAIK. -- Ryan Pavlik <rpav / users.sf.net> "I distinctly remember dancing on your grave." - 8BT