Bug 42517

GemStone/S 64 Bit

3.1.0.1, 3.1, 3.0.1, 3.0

3.1.0.2

Dynamic instance variable error with odd number of tags

Dynamic instance variables replaced the tag mechanism in version 3.0. Dynamic
instance variables use the same storage space, but use a named interface
and store key and value sequentially, rather than the indexed interface
of tags. The tag interface is deprecated in v3.0 and later.

While you should be able to remove the tag value and replace it with an
equivalent dynamic instance variable, if an object has a single tag, the
primitives supporting dynamic instance variables return errors (reporting
that the object is corrupt).

Workaround

Code similar to the following will create the second tag and reset the
fields, so you can add a dynamic instance variable:

anInstance _tagAt: 1 put: #aa. "argument must be a symbol" anInstance _tagAt:
2 put: nil. "create placeholder for value" anInstance removeDynamicInstVar:
#aa.


Last updated: 10/26/12