How to remove obsolete classes
Alain Fischer
mailinglist.fischer at bluewin.ch
Fri May 11 23:33:23 UTC 2001
Hello Yoshiki,
Many thanks for all these hints. Unfortunatly I can't try with
the squeak image that generate the error until Monday.
I have played with a fresh image:
VM: Win32 - Squeak3.1alpha [latest update: #'Squeak3.1alpha' of 28
February 2001 update 3965]
Image: Squeak3.1alpha [latest update: #3987]
and there is some strange things:
Smalltalk obsoleteClasses
is not empty and return:
#(AnObsoleteZipFileEntry AnObsoleteZipFileEntryWriteStream
AnObsoleteGZipWriteStream AnObsoleteArchiveZipWriteStream
AnObsoleteZipWriteStream AnObsoleteButtonProperties
AnObsoleteBitBltSimulation AnObsoleteBitBltSimulator)
Just to see how all work toghether, I am trying to folow the
"objects pointing to this value link" but it doesen't seem easy
Have a nice day
Alain
"Ohshima, Yoshiki" wrote:
>
> Hello Alain,
>
> > It seem that Squeak can't save project with obsolete class
> > How can I remove the obsolete classes ?
>
> A class is an object, so an obsolete class is. If there
> are references which refer to the obsolete class, the
> garbage collector cannot reclaim the obsolete class object
> and it remains in the image.
>
> In your case, my guess is that the change record for your
> project contains deleted class information and which causes
> the problem.
>
> If this is the case, open the change sorter, select the
> suspicious class from the top-right pane and choose 'delete
> class from change set (d)'. Then evaluate "Smalltalk
> garbageCollect" or choose "space left" from the help menu to
> make sure every garbage is collected.
>
> If the result of 'Smalltalk obsoleteClasses' no longer
> contains the class, it is gone and should be ok.
>
> If it remains, you have to do more (sometimes painful)
> work. To find out such reference,
>
> (0) close all transcript and remove transcripts from
> Objects' clss var DependentsField.
> (1) nil out the workspace variables. If there are
> "suspicious" variables in workspace, assign nil to those
> variables.
> (2) Evaluate "Smalltalk garbageCollect" or choose "space
> left" from the help menu to make sure every garbage is
> collected.
> (3) Inspect "Smalltalk obsoleteClasses". This will give
> you the inspector on the obsolete class(es).
> (4) highlight an item in the inspector.
> (5) choose menu item "objects pointing to this value"
> (6) repeat (5) until you find out the "root".
>
> You could use PointerFinder or "Smalltalk
> browseObsoleteReferences."
>
> I guess it would be nice if the change records doesn't
> hold the actual obsolete class.
>
> -- Yoshiki
More information about the Squeak-dev
mailing list
|