I can remember that several times on Squeak I had cases of double
Metaclass pointing to the same class unless it was the contrary (two
clases having sale Metaclass ?).
Chasing pointers never helped me.
So this may be an evil manifestation of an old bug.

I sent this mail on 2010 dec 29 about 'Behavior deepCopy smells'
http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-December/156019.html

And this one on 2010 april 10 about 'PseudoContext strange behavior'
http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/147987.html

Nicolas

2012/5/10 Mariano Martinez Peck <[email protected]>:
>
>
> On Wed, May 9, 2012 at 3:31 PM, Herby Vojčík <[email protected]> wrote:
>>
>> The cause of the problem is probably in this: if you try to inspect
>> dzindzik, VM prints out something like "Directory does not have index: 7".
>> If you try dzindzik instVarAt:1, dzindzik instVarAt:2, ... in a row, you get
>> 6, but there is not 7.
>>
> This is related to the instVar 'layout' that was added to Behavior. If you
> analyze dzindzik, its correct. I mean, the order in its instVars are
> correct. Its problem is "thisClass". As you could notice, you could not
> inspect thisClass because you get an error with the "Directory does not have
> index: 7".
> So, go to SystemWindows and change this method to:
>
> SystemWindow >> #labelled: labelString
>     ^self new setLabel: 'caca'
>
> What we do is to be able to open the inspector while avoiding to ask for its
> class for the label (since it is broken). Now you are able to inspect
> thisClass.
> When you inspect this class, you will see that the first instVars
> (superclass, methodDict and format) are all correct. 'layout' is nil and
> from there, all instVars are shifted one slot. The instvar instanceVariables
> have a classOrganizer. The instVar subclasses has the name, etc...
>
> so... thisClass subclasses -> #Object
>
> Of course, you cannot inspect the last instVar 'localSelectors' because you
> are going out of the scope ;)
>
> In summary it looks like dzindzik is anoher Metaclass of Object, say Object
> class (whose instVars are correct), and dzindzik class is Object but with
> broken (shifted) instVars.
>
> That's all we could fine so far with Guille :)
>
>
>>
>> So dzindzik's class thinks it has (at least) seven inst vars, but in fact
>> in does only have six.
>>
>> Herby
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>

Reply via email to