Hi Jakob --

Wouldn't #comeFullyUpOnReload: be the official method in which to
> place the rehashing?

Aha! Thanks. See Collections-mt.1051. The actual cause of the bug was
in HashedCollection >> #comeFullyUpOnReload: :-)

Best,
Marcel

Am 27.09.2023 20:07:46 schrieb Jakob Reschke <jakres+squeak@gmail.com>:

Hi Marcel,

Wouldn't #comeFullyUpOnReload: be the official method in which to
place the rehashing?

For what it's worth, it is invoked a few lines (not counting the
comments) later in DataStream>>next (readDataFrom:size: is sent during
the perform: in the middle of DataStream>>next).

Kind regards,
Jakob

Am Mi., 27. Sept. 2023 um 19:41 Uhr schrieb Tim Rowledge :
>
> Nice catch. Interesting that the entire Dictionary didn't get read yet; certainly counter-intuitive. Looks to me like the SmartRefStream>>next & ReferenceStream>>next are confusing the issue by claiming the object has been read (which I guess it has, really) even though its instvars have not, yet.
>
> > On 2023-09-27, at 2:15 AM, Marcel Taeumel via Squeak-dev wrote:
> >
> > ...this is probably due to cycles in the object graph:
> >
> >
> >
> > So, we probably should not call #rehash on objects that are incomplete there due to cycle detection. Hmm...
> >
> > Best,
> > Marcel
> >> Am 27.09.2023 10:55:05 schrieb Marcel Taeumel :
> >>
> >> Hmm... we added extra #rehash sends in 2022 to SmartRefStream >> #next. That's why the behavior changed from 5.3/6.0 to 6.1alpha. Hmm...
> >>
> >> The dictionary in question is the "objects" instVar for the central instance of SMSqueakMap. it interesting thing is that it passes twice through SmartRefStream >> #next. The first time with an invalid array and the second time complete and re-hash-able. Hmm...
> >>> Am 27.09.2023 03:08:22 schrieb Tim Rowledge :
> >>>
> >>> Whilst updating the SM entries for MQTT etc I went to update the SM tool and it fails when reading the update map. The issue appears to be that deep in the process a Dictionary exists that has a tally of 4162 but an array of nil. Which doesn't seem quite proper somehow.
> >>>
> >>> The starting point is SMLoaderPlus>loadUpdates but a long way later we get to SmartRefStream>>#readInstanceSize:clsname:refPosn: with a refPosn of 1270478. A couple of methods later we try to rehash the Dictionary
> >>>
> >>>
> >>> This can never end well.
> >>>
> >>> There's no way I have time to do anything much with this, so volunteers needed...
> >>>
> >>>
> >>> tim
> >>> --
> >>> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
> >>> Littergators resolve disputes about rubbish
> >>>
> >>>
> >>>
> >
>
>
> tim
> --
> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
> "Bother" said Pooh, as the IRS kicked his door in.
>
>
>