Yoshiki Ohshima wrote:
>> I'm playing with Epaati-10 a bit. Entering >> Grade2/Math/Unit4/IIM4_2_money identification.011.pr and coming back >> (the instance of Project did get collected, but the accompanying >> PasteUpMorph serving as its world along with all objects and players >> are lingering. Now, I'm (again) looking at the issue so hopefully I >> get to something... >> > > Just a progress report, but the issue is basically around > #rootsIncludingPlayers not finding all classes, and the problem is > caused by a project that has scripts that reference to an object that > was trashed. Namely, > > - You created object A and object B. > - You wrote a script C at object B that refers to object A > (This creates the uniclass for B). > - You wrote a script D at object A that refers to object B. > (This creates the uniclass for A). > - You dismissed/trashed object B. > - The project was saved. > > What happens is that to keep the script D running and project working, > the system exports the object B into the saved project as well. But > because it is trashed, it is not "in the world", but referenced from > the scripts. > > Epaati loads such a project, and upon exiting the project, it tries > to remove the project. From #okToChangeSilently, > #rootsIncludingPlayers is called to find the uniclasses used in the > project. But the logic only looks at the objects in the world, and > overlook the object B and the B's uniclass. > > Because B has a script that refers to A, pretty much everything in > the project is kept because the world is reachable through A's owner > chain. > Yes, there should be a similar mechanism as when you delete referenced method in the Browser, that open or list the scripts that references the deleted script or player. > I still think Etoys/Smalltalk is almost suitable for what you are > doing, but loading and unloading a lot of project in a session wasn't > a typical use case. In a sense Epaati is stretching it. But it is > fixable fortunately. > > One thing we definitely should do is to make #rootsIncludingPlayers > better. I can think of a few different ways. One thing you should do > is revisit your projects and make sure that every object refered to > from the project to "live" in the project. > IIM4_2_money identification.011.pr, for example, has quite a few of such objects. > > To check these guys, open a workspace in a fresh epaati.image, and > evaluate: > > old := PasteUpMorph allInstances. > > Then load IIM4_2_money identification.011.pr and come back. In the > same workspace evaluate: > > new := PasteUpMorph allInstances. > new := (new copyFrom: old size + 1 to: new size). > new := new select: [:e | e knownName = 'page']. > > and look at the submorphs of these pages bound to new. > > -- Yoshiki > > > Karl |
In reply to this post by Yoshiki Ohshima-2
Ties,
Please try attached change set. In Epaati-10, it seems to remove almost all objects. (There are uninstanciated uniclasses left; that may have to be removed by calling some methods like: Player abandonUnnecessaryUniclasses and Player removeUninstantiatedSubclassesSilently -- Yoshiki MoreOkTochange-yo.1.cs (4K) Download Attachment |
Free forum by Nabble | Edit this page |