becomeForward makes corrupted objects

Tim Rowledge tim at sumeru.stanford.edu
Thu Nov 18 21:54:55 UTC 2004


Martin Kuball <MartinKuball at web.de> wrote:

> After changing all instances of all obsolete classes to nil, some of 
> those classes are gone. When I try to "nil" the remaining obsolete 
> classes, the follwoing two
> 
> AnObsoleteAlignmentMorphBob1
> AnObsoleteEventMessageSet
> 
> result in a corrupted object memory when I send them a becomeForward: 
> nil message. Maybe I should not send such a message to a class 
> object? But than, how do I get rid of these obsolete classes?
It's not good that you get a memory corruption in this case but it's
very not-good to try to get rid of objects by any sort of become
trickery. Find the objects pointing to them and use an inspector (or
even send messages! What a concept :-) to nil out those pointers. The
offending unwanted objects will then disappear.

If you provide some code to illustrate how the OM gets corrupted we can
try to debug it. I recently did soem work on stopping objectA become:
objectA crashes and it's conceivable this is related.

tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Brain like a hard drive with no read/write head.



More information about the Squeak-dev mailing list