[Cuis-dev] ReferenceStream cannot read Dictionary object written with Squeak (was Re: ReferenceStream restoreFromFile: aFileEntry goes into infinite loop)
H. Hirzel
hannes.hirzel at gmail.com
Tue Sep 23 11:00:29 PDT 2025
Hi Juan
Yes, I am lucky enough that my "database" (in the form of a data obj file)
currently uses "small" SmallIntegers (values < 10000, and mostly <=255 in
ByteArrarys).
Moving it from Squeak to Cuis is fine again.
Thank you for re-establishing this compatibility in Cuis 7.5 with change
set 7600-ReferenceStream-Compatibility!
I am currently looking into the issue you mention with a broken
implementation serializing larger values of SmallIntegers with DataStreams
or ReferenceStreams in Squeak. I want to identify these cases and will post
the results under a subject 'ReferenceStreams with "large" SmallIntegers in
Cuis and Squeak'
--Hannes
On Mon, Sep 22, 2025 at 3:45 PM Juan Vuletich <juan at cuis.st> wrote:
> Hi,
> On 22/09/2025 10:10 AM, H. Hirzel via Cuis-dev wrote:
>
> I could identify the change set which causes the problem, it is from last
> Wednesday
>
> CoreUpdates\
> 7580-ReferenceStream-61BitSmallIntegers-fix-JuanVuletich-2025Sep17-08h16m-jmv.001.cs.st
>
> It introduces a new version of #readInteger and writeInteger: in the class
> DataStream.
> If I undo the change of this change set it works.
>
> --Hannes
>
>
> As you saw in that changeset (file name, comments in code, c ommit
> message), and as exemplified in the test added to BaseImageTests shortly
> after, what that code does is not to cause a problem, but to fix a serious
> bug that has been around for a long time and that is still present in
> Squeak. Just try to serialize an object with a largish SmallInteger and see
> what you get back.
>
Anyway. I just pushed a better implementation that uses a different format
> for 32bit SmallIntegers than from larger ones. This brings back
> compatibility with the badly broken Squeak format, although it obviously
> can't bring back the bits that Squeak discarded when saving the file, and
> results will be wrong unless you're lucky enough to only use small
> SmallIntegers.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250923/d424ea5f/attachment-0001.htm>
More information about the Cuis-dev
mailing list