[Pharo-users] Fuel FLMethodChanged error
Mariano Martinez Peck
marianopeck at gmail.com
Sat Jun 9 17:43:18 EDT 2012
>> After loading FuelMetaLevel as Martin suggested the above code works to
>> serialize and materialize the problematic domain objects just fine.
> Ok, just to clarify: when you install the package Fuel only, and in your
> graph you have entities like classes or methods, they will be considered
> "global", that is, we just store the class name and selector and during
> materialization we search it in the Smalltalk globals. If the class/method
> is not present, we throw an error. Now...closures are more complicated
> because you can even EVALUATE them. If the method surrounding the closure
> has changed in the image you are materializing, evaluating the closure
> (depending on the change in the method) can even crash your VM. Because of
> that, when serializing methods "as globals" we also store a chemsum and we
> compare during materialization to see that it hasn't change it. If changed,
> we throw the FLMethodChanged.
> With the package FuelMetalevel, and by using #newFull the serializer will
> consider the method as "full" so it will be fully serialized, and therefore
> you don't have the problem of the checksum.
> Anyway, you found a bug because you should not be needing FuelMetalevel
> since you are serializing and materializing in the same image.
Ok...the problem was when you are using the normal (light) serialization
with Fuel where methods are always serialized as global. In your case, the
method was "not installed" and therefore, was different during
materialization. I have just commited Fuel-MarianoMartinezPeck.695. If you
know try to serialize again your example, you should get a
FLNotInstalledMethod error saying " #XXXSelector can not be serialized as
global because it is not installed. You need FuelMetalevel to fully
serialize methods. See the documentation. '"
And now in http://rmod.lille.inria.fr/web/pier/software/Fuel/Errors I have
added that exception and its explanation:
** FLNotInstalledMethod** By default, Fuel serializes methods as globals.
For more details see this
I am an error produced during serialization, signaled when trying to
serialize a method that is not installed in any class. It is a prevention,
because such method is lekely to be absent during materialization. This
case may happen when serializing closures that hold references to not
installed methods. If the user wants to fully serialize methods, then it
needs to install the package FuelMetalevel (see this page for
and create the serializer by using the method #newFull. Example:*
* FLSerializer newFull serialize: anObject toFileNamed: 'example'.*
> We will investigate it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-users