[squeak-dev] Loading preferences fails in 64bit 20892 image
tim at rowledge.org
Mon Dec 27 00:14:35 UTC 2021
This is admittedly an older preferences file, and I could certainly just re-make it. BUT since it does break a rather useful facility let's at least record the problem.
In the Preferences class>>#loadPreferencesFrom: method as of mt 11/22/2021 the loading fails because the IdentityDictionary loaded seems to get very unhappy in the reject:thenDo: process.
The relevant code is -
reject: [:key | patternsToIgnore anySatisfy: [:pattern | pattern match: key]]
thenDo: [:key | | value |
value := dict at: key.
(self preferenceAt: key ifAbsent: [nil]) ifNotNil:
[:pref | [pref preferenceValue: value preferenceValue]
on: Deprecation do: [ : err | "Ignore preferences which may not be supported anymore."]]].
Somehow the dict at: key fails because the dict at: method cannot find the key that is passed in by code that extracted it from the dict... Well, that's not nice.
The best plausible cause I can up with right now is that the use of aReferenceStream on data saved in 2017 (almost certainly a 32bit image) might be suffering from some load/conversion malaise. I reverted the method to the prior (cmm 1/10/2020) version and it loaded my prefs. Saving them afresh, reverting the method back to the mt 11/22/2021 version and loading the new prefs file into an untouched 20892 image worked. This seems to support my hypothesis.
I don't think this is worth any major angst but since it may bite somebody else it is useful to have the info in archive.
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: CRN: Compare to Random Number
More information about the Squeak-dev