Hi,
I just reported a bug in Mantis: http://bugs.impara.de/view.php?id=5230 and I'm hoping someone can help. The basic problem is that the TestingScriptRegistry is left holding references to scripts after Croquet is shut down. This is a minor annoyance in CroquetMaster or DemoMaster since the things it references are rather small. In my Croquet space the scripts include references to my entire TSpace. This causes my image to almost double each time I save. I know I can clean up the mess with this incantation: TestingScriptRegistry removeUnreferencedKeys; inspect. Smalltalk garbageCollect. (thanks Peter Moore) but is there a way to figure out why this is happening? Thanks in advance for any help, Liz Wendland University of Minnesota |
What you need to do to fix this problem is to implement the "myScripts"
property on the classes you find as keys in the registry. E.g., if there is "a FooBar" in there, you should implement: FooBar>>myScripts "Answer my scripts" ^myScripts "an iVar" ifNil:[#()] FooBar>>myScripts: scriptList "Set my scripts" myScripts := scriptList. Cheers, - Andreas Liz Wendland wrote: > Hi, > > I just reported a bug in Mantis: http://bugs.impara.de/view.php?id=5230 > and I'm hoping someone can help. The basic problem is that the > TestingScriptRegistry is left holding references to scripts after > Croquet is shut down. This is a minor annoyance in CroquetMaster or > DemoMaster since the things it references are rather small. In my > Croquet space the scripts include references to my entire TSpace. This > causes my image to almost double each time I save. > > I know I can clean up the mess with this incantation: > > TestingScriptRegistry removeUnreferencedKeys; inspect. > Smalltalk garbageCollect. > (thanks Peter Moore) > > but is there a way to figure out why this is happening? > > Thanks in advance for any help, > > Liz Wendland > University of Minnesota > > > |
In reply to this post by Liz Wendland
Hi Andreas,
I have made the fix you recommended. For the problems I saw in CroquetMaster I had to add the myScripts methods to CroquetHarness. Seemed to fix the problem because I no longer have any leftover keys in the TestingScriptRegistry. For my own Master I had to change TFarRef though (because that was the object I was seeing traces of in the TestingScriptRegistry). This also seems to fix my problem... except I am scared because about every 20th time I run my Master it will fail with this message: MessageNotUnderstood: UndefinedObject>>isScriptDescriptorIn: and this occurs in TFarRef(Object)>>stopScript: I think this might be a problem I introduced by adding myScripts and myScripts: to TFarRef. What do you think? Thanks! Liz Wendland Andreas Raab wrote: > What you need to do to fix this problem is to implement the > "myScripts" property on the classes you find as keys in the registry. > E.g., if there is "a FooBar" in there, you should implement: > > FooBar>>myScripts > "Answer my scripts" > ^myScripts "an iVar" ifNil:[#()] > > FooBar>>myScripts: scriptList > "Set my scripts" > myScripts := scriptList. > > Cheers, > - Andreas > > Liz Wendland wrote: >> Hi, >> >> I just reported a bug in Mantis: >> http://bugs.impara.de/view.php?id=5230 and I'm hoping someone can >> help. The basic problem is that the TestingScriptRegistry is left >> holding references to scripts after Croquet is shut down. This is a >> minor annoyance in CroquetMaster or DemoMaster since the things it >> references are rather small. In my Croquet space the scripts include >> references to my entire TSpace. This causes my image to almost >> double each time I save. >> >> I know I can clean up the mess with this incantation: >> >> TestingScriptRegistry removeUnreferencedKeys; inspect. >> Smalltalk garbageCollect. >> (thanks Peter Moore) >> >> but is there a way to figure out why this is happening? >> >> Thanks in advance for any help, >> >> Liz Wendland >> University of Minnesota >> >> >> |
In reply to this post by Liz Wendland
Liz Wendland wrote:
> I think this might be a problem I introduced by adding myScripts and > myScripts: to TFarRef. What do you think? Indeed. This (and the surrounding changes) have been on my TODO list for a while already. It won't get done in this release though, but hopefully in the next. Cheers, - Andreas |
Free forum by Nabble | Edit this page |