[Cuis-dev] Saving StyledText.pck.st seems to corrupt it
Bernhard Pieber
bernhard at pieber.com
Sat Mar 25 10:55:47 PDT 2023
I just realised that this is probably no corruption but just a conversion to UTF-8. The method #testOldInstanceDeserialization is a special method which contains binary data. In any case the package file could be installed without problems in a new image.
Sorry for the noise.
The testOldInstanceDeserialization test fails, though, as do many others (mostly having to do with pasting and RTF conversion).
Bernhard
> Am 25.03.2023 um 18:20 schrieb Bernhard Pieber via Cuis-dev <cuis-dev at lists.cuis.st>:
>
> Hi everyone,
>
> When I load the StyledTextEditor in a updated image and save the [StyledText.pck.st](http://styledtext.pck.st/) it seems to get corrupted. This is how it looks like in git diff:
> bernhard at MacBookPro16 StyledTextEditor % git diff
> diff --git a/[StyledText.pck.st](http://styledtext.pck.st/) b/[StyledText.pck.st](http://styledtext.pck.st/)
> index f400d0f..f7a1471 100644
> --- a/[StyledText.pck.st](http://styledtext.pck.st/)
> +++ b/[StyledText.pck.st](http://styledtext.pck.st/)
> @@ -1,4 +1,4 @@
> -'From Cuis 6.0 [latest update: #5202] on 26 May 2022 at 12:49:33 pm'!
> +'From Cuis 6.0 [latest update: #5718] on 25 March 2023 at 5:58:07 pm'!
> 'Description Please enter a description for this package.'!
> !provides: 'StyledText' 1 57!
> !requires: 'Cuis-Base' 42 2621 nil!
> @@ -850,7 +850,7 @@ createFeaturesParagraphStyleSet
> bulleted privateFamilyName: familyName pointSize: 11 emphasis: 0 color: nil
> alignment: CharacterScanner justifiedCode firstIndent: 10 restIndent: 30 rightIndent: 10
> spaceBefore: 8 spaceAfter: 2;
> - privateListBulletPattern: '<B0> '.
> +privateListBulletPattern: '° '.
>
> smalltalkCode _ self paragraphStyleNamedOrNew: 'Smalltalk code'.
> smalltalkCode privateFamilyName: familyName pointSize: 11 emphasis: 0 color: nil
> @@ -953,7 +953,7 @@ createSampleParagraphStyleSet
> bulleted privateFamilyName: familyName pointSize: s emphasis: 0 color: nil
> alignment: CharacterScanner justifiedCode firstIndent: s restIndent: s*3 rightIndent: s
> spaceBefore: s*8//10 spaceAfter: s*2//10;
> - privateListBulletPattern: '<B0> '.
> +privateListBulletPattern: '° '.
>
> smalltalkCode _ self paragraphStyleNamedOrNew: 'Smalltalk code'.
> smalltalkCode privateFamilyName: familyName pointSize: s emphasis: 0 color: nil
> @@ -3289,49 +3289,49 @@ testOldInstanceDeserialization
> oldFormat _ '^D^@^@^@^D^H^@^@^@^D^Q^Oclass structure ^@^@^@^C^F
> Dictionary^D^@^@^@^T^H^@^@^@0^A^A^A^A^@^@^@^C^F^KAssociation^F^FObjec^@^@^@^A^D^@^@^@^@^A^P^C^@?^F^VSequenceableCollectio^@^@^@^A^D^@^@^@^@^A^P^C^@?^F^OStyledTextMode^@^@^@^C^D^@^@^@^@^Q actionMap^Q^NactualContents^A^A^A^A^A^A^A^A^A^A^P^C^@?^F^EPoin^@^@^@^C^D^@^@^@^@^Q^Ax^Q^Ay^A^A^A^A^A^P^C^@?^F^HRunArra^@^@^@^G^D^@^@^@^@^Q^Druns^Q^Fvalues^Q lastIndex^Q^GlastRun^Q
> lastOffset^Q^NcanJoinMessage^P^C^@?^F^KActiveMode^@^@^@^B^D^@^@^@^@
> -^@^@^@<A5>^P^C^@?^F^FSymbo^@^@^@^A^D^@^@^@^@^A^P^C^@?^F^QArrayedCollectio^@^@^@^A^D^@^@^@^@^P^C^@?^F^FNumbe^@^@^@^A^D^@^@^@^@^P^C^@?^F TextMode^@^@^@^C^D^@^@^@^@
> -^@^@^@<A5>
> -^@^@^@<B0>^A^A^P^C^@?^F^DTex^@^@^@^C^D^@^@^@^@^Q^Fstring^Q^Druns^P^C^@?^F Rectangl^@^@^@^C^D^@^@^@^@^Q^Forigin^Q^Fcorner^P^C^@?^F^KProtoObjec^@^@^@^A^D^@^@^@^@^A^A^P^C^@?^F
> …
>
> I can reproduce it with these steps:
>
> mkdir StyledTextEditor
> cd StyledTextEditor
> git clone --depth 1 https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev.git
> curl -L -o squeak.cog.spur_macos64x64.dmg https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202206021410/squeak.cog.spur_macos64x64.dmg
> Mount .dmg and copy Squeak.app to folder StyledTextEditor
> git clone https://github.com/Cuis-Smalltalk/StyledTextEditor.git
> git clone https://github.com/Cuis-Smalltalk/Morphic.git
> ./Squeak.app/Contents/MacOS/Squeak Cuis-Smalltalk-Dev/Cuis6.0-5686.image
>
> In Cuis do:
> ChangeSet installNewChanges.
> Feature require: 'StyledText'.
> Open > Installed Packages
> Select StyledText 1.57.
> Delete the description
> Click save
>
> Back in the terminal:
> cd StyledTextEditor
> git diff
>
> When I save the package Compression 1.32 no such corruption seems to occur. Has anyone encountered this type of problem in some other package?
>
> Cheers,
> Bernhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230325/883a1024/attachment-0001.htm>
More information about the Cuis-dev
mailing list