[plt-dev] FYI: Intermittently, editors pack/unpack to length 0 string ?

From: John Clements (clements at brinckerhoff.org)
Date: Fri Apr 24 13:46:09 EDT 2009

I'm having another intermittent problem that may be related to the  
recent changes to editors.

I'm using the handin engine to accept assignments, and I've now twice  
gotten into a state where the handin server reports failure because it  
claims that the submission is of zero length.  I added some diagnostic  
code the first time, and discovered that sending "get-text" (sp?) to  
the text% that is the result of .. okay, let me just write this in  
scheme:

   (let*-values ([(defs dc) (unpack-submission bytes)]
                 [(text) (send defs get-text)])
   (string-length text))

This evaluates to zero.  Closing and restarting the client-side  
DrScheme makes the problem go away.

I realize that a valuable diagnostic result here would be the length  
(and content) of the value 'bytes', and if this happens again, I'll  
try to capture it.

In the meantime, all I can tell you is that packing and unpacking the  
definitions window using the Handin server periodically results in an  
empty string.

One final piece of information, hopefully irrelevant: I'm using  
drocaml, here, so the definitions window in question contains an  
editor that's being operated on by drocaml code.  I imagine that it  
shouldn't be possible for drocaml to get the editor into a "bad  
state", but I can't be sure.

This may belong in the FYI bin.

John Clements

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20090424/b4ada55c/attachment.p7s>

Posted on the dev mailing list.