[racket-dev] Modules with images can not be mashalled?!

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Nov 18 09:40:51 EST 2010


I can confirm this behavior and I consider it a bug. I have submitted a bug (#11448) in your name so that you hear back when we get around to fixing it. 

In the meantime, I propose you use the work arounds that you have figured out. 

Sorry for any inconvenience -- Matthias





On Nov 18, 2010, at 4:38 AM, Benjamin Seppke wrote:

> Hi,
> 
> we use DrRacket for educational purpose at our University and have found out some "strange" behavior of the module system.
> 
> For one excercise, we provide a racket module containing (and providing) symbols that have images (of flags) as values. The students should use these images to visualize the results of their programs.
> 
> When the module file is put in the same directory  as the students' excercise file, Racket gives an error message after (require "flag-module.rkt") telling us:
> 
> write: cannot marshal constant that is embedded in compiled code: (object:image-snip% ...)
> 
> Okay, so marshalling is the problem here... However, it works if we add the file to the collects/XXX Folder and load it via (require xxx/flag-module) - maybe because collect modules are not compiled again?
> 
> It also works if I uncheck "fill compiled/-directories" in "Language->Select lang->Details". Although this works, I would prefer a successful loading of modules, which contain images, without disabling the compilation. As I'm not too familiar with Racket's internals, I'm asking if there is a way to achieve that. Or - maybe - if this behavior is by design, and Racket is supposed to work like that?
> 
> Btw, I am using Racket 5.0.1 @ Mac OS X 10.5, but this behavior seems to occur independently of the OS.
> 
> Best regards,
> Benjamin Seppke
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/dev



Posted on the dev mailing list.