On 13/06/11 5:49 PM, Mariano Martinez Peck wrote:
Why the following is not enought?
(FLSerializer on: myStream) serialize: myPRKernel.
and
(FLMaterializer on: myStream) materialize
Yes, that's pretty much the code. Except that it's in a test case that uses FSMemoryStore. The tests run a lot faster when writing to memory, instead of to disk.
The FSMemoryStore holds the "file" bytes in a ByteArray. During serialization, I got a stack trace with KeyNotFound due to FLSerializer>>nextPutReferenceTo: when the object is the "file" ByteArray.
Since this ByteArray is where the serialization is being written to,
mmmmmm so you are using a stream to serialize and such stream is also being refenced from the object to serialize?
Yes, that's it - except that the stream is an FSWriteStream on a FSMemoryStore "file", which I think is an issue here. The PRKernel is holding an instance of PRFuelPersistency, which holds an FSReference. That FSReference happens to refer to a memory-based "file".