[plt-scheme] Deserialization error

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Feb 11 07:48:54 EST 2009

At Tue, 10 Feb 2009 16:36:48 -0500, Ryan Culpepper wrote:
> On Feb 10, 2009, at 12:42 PM, M. Fatih Köksal wrote:
> > We have this serializable structure exported by record.ss
> >
> > (module record mzscheme
> >  (require scheme/serialize)
> >  (provide record make-record record-timestamp record-operation
> > record-start record-len record-content)
> >  (define-serializable-struct record (timestamp operation start len
> > content)))
> >
> > Then we serialize the keystrokes and write it to a file
> >
> > ...
> >
> > (define (serialize-record rec)
> >        (with-output-to-file
> > 		"/tmp/fatih.record"
> > 		(lambda ()
> > 			(begin  (display (serialize rec))
> > 				(display "\n")))
> > 		'binary
> > 		'append))
> > ...
> >
> > Here are some example lines from the file fatih.record;
> >
> > ((1) 1 (((lib screen-replay/record.ss) . deserialize-info:record- 
> > v0)) 0
> > () () (0 1234286023 insert 0 1 (u . a)))
> > ((1) 1 (((lib screen-replay/record.ss) . deserialize-info:record- 
> > v0)) 0
> > () () (0 1234286023 insert 1 1 (u . s)))
> > ((1) 1 (((lib screen-replay/record.ss) . deserialize-info:record- 
> > v0)) 0
> > () () (0 1234286024 insert 2 1 (u . d)))
> >
> > We are able to read the lines from the file, but deserializing gives
> > this error;
> >
> >> (deserialize (with-input-from-file "/tmp/fatih.record" read 'binary))
> >
> > standard-module-name-resolver: expected argument of type <module- 
> > path or
> > path>; given
> > "/home/fkoksal/.plt-scheme/4.0.1/collects/screen-replay/record.ss"
> >
> >
> > Any comments?
> 
> This looks to me like a bug in the serialize library.

I agree, but I haven't been able to recreate the problem...

Can you provide step-by-step instructions for arraiving at the error?

I expect that you're organizing the code among module in a different
way that I was trying, or you're using a different REPL or using it in
a different way than I was trying.

Thanks,
Matthew



Posted on the users mailing list.