On Thu, Jun 7, 2012 at 11:16 PM, Paul DeBruicker <[email protected]> wrote:

> The problem was that in one of the inst vars of my class that had the
> error I was in some instances storing a Dictionary and other instances
> storing a SortedCollection with a custom sortBlock.  They should have all
> been dictionaries but some instances had not been migrated to dictionaries.
> Once I fixed that the problem went away.
>
>
Hi. Fuel does support full serialization of closures  but you may need to
"enable" that.
BTW, can you try something with the image where you still have the closure
and try to serialize this way:

| serializer |
serializer := FLSerializer newFull.
serializer serialize: xxx on: aStream.

and tell me if that also work?



> This bit in a workspace also raises an error. I'm not sure why it does and
> I don't know why you'd ever do it in practice:
>
> |coll|
> coll:=OrderedCollection new.
> (Interval from: 1 to: 100) do: [:each|
>        coll add:( each \\ 2 = 0
>                ifTrue: [SortedCollection sortBlock:[:a :c | a name < c
> name] ]
>                ifFalse:[Dictionary new] ) ].
>
> FLSerializer serialize: coll toFileNamed: 'collection.fuel'.
>
> FLMaterializer materializeFromFileNamed: 'collection.fuel'
>
>
Thanks, I could reproduce it. I will take a look soon.




>
>
>
>
>
> On 06/07/2012 01:18 PM, Mariano Martinez Peck wrote:
>
>>
>>
>> On Thu, Jun 7, 2012 at 10:12 PM, Paul DeBruicker <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>>    I'm trying to serialize and materialize some domain objects. If I
>>    run this:
>>
>>
>>    FLSerializer serialize: users toFileNamed: 'users.fuel'.
>>
>>
>>    The file users.fuel is created.
>>
>>    If in the same workspace in the same Pharo 1.3 image on Cog 2550 /
>>    Linux 64 bit I subsequently run:
>>
>>    FLMaterializer materialzeFromFileNamed: 'users.fuel'
>>
>>    I get an FLMethodChanged error.
>>
>>
>> that looks weird, because you are materializng in the SAME image ...
>>
>>
>>    If I just serialize and materialize strings, numbers, and
>>    DateAndTime objects to files everything works fine and all 248 Fuel
>>    tests pass no problem.
>>
>>    The incoming method it has a problem with is an #initialize method.
>>
>>
>> which class is the one that contains that #initialize?
>> do you have an #initialize in your image that uses pragmas?
>>
>>    The serializeHash is 15407 and the result of 'method bytecodesHash'
>>    is 30998.
>>
>>
>> can you try closing all opened ssytem browsers (nautilus windows or
>> wharever)?
>>
>>
>>    What should I check to diagnose/fix this problem?
>>
>>
>> is your data private or you can provide an image with "users" so that we
>> can test?
>>
>>    Thanks
>>
>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.**com <http://marianopeck.wordpress.com>
>>
>>
>
>


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to