On 13 Mar 2015, at 08:39, Max Leske <maxleske@gmail.com> wrote:
On 13 Mar 2015, at 07:37, Max Leske <maxleske@gmail.com> wrote:
On 13 Mar 2015, at 02:24, Sean P. DeNigris <sean@clipperadams.com> wrote:
Sean P. DeNigris wrote
the file-in target had the slots in the same order as the inst var indexes.
One more observation: if I serialize in the second image (the one that originally materialized), and materialize in a fresh image, the object is faithfully created i.e. the same as the serialized object.
Hi Sean
This definitely sounds like a problem related to slots. Fuel materializes instance variables by name and not by index, so what you describe shouldnât be possible. Iâll see what I can find.
Well, that was actually wrong. Fuel does use indeces, not names during materialization.
Cheers, Max
I wasnât able to reproduce your problem. I see the problem when I materialize your file but when I try to recreate the situation everything works. Have you tried the same with two fresh images (of the same version respectively)?
I even tried switching around instance variables to see if I could see a difference in ordering when using #instanceVariables et al but no luck. It really looks like you serialized an instance of a class with switched instance variables.
What I donât understand, is how you got to the situation where âself slotsâ didnât have the same ordering as âself instanceVariablesâ.
AFAICT that can only happen if thereâs an error during class modification, since this ClassDescription>>superclass: aSuperclass layout: aLayout layout := aLayout. self superclass: aSuperclass methodDictionary: MethodDictionary new format: aLayout format. self halt. instanceVariables := layout instanceVariables asArray is (in practice) the only place where âinstanceVariablesâ is set.
----- Cheers, Sean -- View this message in context: http://forum.world.st/BUG-Strange-Fuel-Result-tp4811628p4811631.html <http://forum.world.st/BUG-Strange-Fuel-Result-tp4811628p4811631.html> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com <http://nabble.com/>.