[5.1] DataStream bug (MessageNotUnderstood: UndefinedObject>>instSize)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[5.1] DataStream bug (MessageNotUnderstood: UndefinedObject>>instSize)

Bert Freudenberg
This appears to happen a lot in 5.1, e.g. the first time you compare a package in Monticello:

UndefinedObject(Object)>>doesNotUnderstand: #instSize
nil(Object)>>storeDataOn:
DataStream>>writeInstance:
DataStream>>nextPut:

Anybody else seeing it?

- Bert -



SqueakDebug.log (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [5.1] DataStream bug (MessageNotUnderstood: UndefinedObject>>instSize)

Chris Muller-3
It may be related to serialization / materialization of Character objects...

On Wed, Aug 24, 2016 at 5:43 AM, Bert Freudenberg <[hidden email]> wrote:

> This appears to happen a lot in 5.1, e.g. the first time you compare a
> package in Monticello:
>
> UndefinedObject(Object)>>doesNotUnderstand: #instSize
> nil(Object)>>storeDataOn:
> DataStream>>writeInstance:
> DataStream>>nextPut:
>
> Anybody else seeing it?
>
> - Bert -
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [5.1] DataStream bug (MessageNotUnderstood: UndefinedObject>>instSize)

Bert Freudenberg
No, it's a only problem in the specific image I was using, not in the actual release image:

0 class
==> SmallInteger

1 class
==> nil

All odd SmallInts answer nil when asked for their class ... I'll show this to Eliot later (we're all in Prague for ESUG right now).

- Bert -

On Wed, Aug 24, 2016 at 6:23 PM, Chris Muller <[hidden email]> wrote:
It may be related to serialization / materialization of Character objects...

On Wed, Aug 24, 2016 at 5:43 AM, Bert Freudenberg <[hidden email]> wrote:
> This appears to happen a lot in 5.1, e.g. the first time you compare a
> package in Monticello:
>
> UndefinedObject(Object)>>doesNotUnderstand: #instSize
> nil(Object)>>storeDataOn:
> DataStream>>writeInstance:
> DataStream>>nextPut:
>
> Anybody else seeing it?
>
> - Bert -
>
>
>




Reply | Threaded
Open this post in threaded view
|

Re: [5.1] DataStream bug (MessageNotUnderstood: UndefinedObject>>instSize)

Bert Freudenberg
On Thu, Aug 25, 2016 at 12:25 PM, Bert Freudenberg <[hidden email]> wrote:
No, it's a only problem in the specific image I was using, not in the actual release image:

0 class
==> SmallInteger

1 class
==> nil

All odd SmallInts answer nil when asked for their class ... I'll show this to Eliot later (we're all in Prague for ESUG right now).

Yep, Eliot recognized the issue immediately. In Spur, all classes are held in a table indexed by the class's identity hash. SqueakJS doesn't need that table (it uses direct class pointers) so it generates it when storing the image. This worked fine, except that the SmallInteger class needs to be put in two slots of the class table: 1 (which is its hash) and 3. I fixed this in SqueakJS now so all is good.

This has to do with the special class lookup for immediate objects. For them, Spur simply masks the tag bits, and uses the value as index into the class table. In 32 bits we have two tag bits, but both 2r01 and 2r11 are used for SmallIntegers. Character uses 2r10, which is why Character's hash has to be 2. All regular objects use tag bits 2r00.

- Bert -