[Pharo-users] Re: How do I remove old classes?

2021-07-23 Thread Clacton Server
Good thinking. I will check that out.
Thank you.
David

> On 23 Jul 2021, at 16:34, Richard Sargent 
>  wrote:
> 
> 
> 
> On Fri, Jul 23, 2021, 06:57 Clacton Server  > wrote:
> I have been having an enduring problem with Pharo "disappearing" on any 
> machine I try it on. In an effort to resolve that it isn't my code, I want to 
> remove the Package that contains all my Seaside code so that I can install a 
> minimal home page under Seaside. This will, at least exonerate my code. 
> However, I have removed the offending package, executed Smalltalk cleanUp: 
> true but I can still get into the old code. A debugger comes up when I try 
> the old code and it shows 
> "AnObsoleteCNWMeetingsGalleries(AnObsoleteCNWBasic)" so the code is still 
> there and all the bots that have the address will still be calling it. How do 
> I finally remove the code?
> 
> I would venture that you previously registered the class as a Seaside 
> handler/application/whatever and the registry holds the class despite it 
> being removed from the Smalltalk global dictionary.
> 
> If so, you would need to remove it from the registry.
> 
> 
> David Pennington



[Pharo-users] Re: How do I remove old classes?

2021-07-23 Thread Richard Sargent
On Fri, Jul 23, 2021, 06:57 Clacton Server  wrote:

> I have been having an enduring problem with Pharo "disappearing" on any
> machine I try it on. In an effort to resolve that it isn't my code, I want
> to remove the Package that contains all my Seaside code so that I can
> install a minimal home page under Seaside. This will, at least exonerate my
> code. However, I have removed the offending package, executed Smalltalk
> cleanUp: true but I can still get into the old code. A debugger comes up
> when I try the old code and it shows
> "AnObsoleteCNWMeetingsGalleries(AnObsoleteCNWBasic)" so the code is still
> there and all the bots that have the address will still be calling it. How
> do I finally remove the code?
>

I would venture that you previously registered the class as a Seaside
handler/application/whatever and the registry holds the class despite it
being removed from the Smalltalk global dictionary.

If so, you would need to remove it from the registry.


> David Pennington


[Pharo-users] Re: How do I remove old classes?

2021-07-23 Thread Kasper Osterbye
Not knowing your specific usage, this tends to happen if you have an instance 
of class X, and then remove the class. To save the instance from going stale, 
Smalltalk has always made an Obsolete class.

You can find the offending X instance by inspecting this:
ReferenceFinder findAllPathsTo: X allInstances first

This examines the first instance, you might want to print
X allInstances size 
to see how big your issue is.

Also, perhaps you need to force a garbage collect first:
Smalltalk image garbageCollect

Tracing the back-references can be a bit overwhelming the first times. For me 
the culprit has often been some global variable I thought I had under control.

Best,

Kasper


> On 23 Jul 2021, at 15.56, Clacton Server  wrote:
> 
> I have been having an enduring problem with Pharo "disappearing" on any 
> machine I try it on. In an effort to resolve that it isn't my code, I want to 
> remove the Package that contains all my Seaside code so that I can install a 
> minimal home page under Seaside. This will, at least exonerate my code. 
> However, I have removed the offending package, executed Smalltalk cleanUp: 
> true but I can still get into the old code. A debugger comes up when I try 
> the old code and it shows 
> "AnObsoleteCNWMeetingsGalleries(AnObsoleteCNWBasic)" so the code is still 
> there and all the bots that have the address will still be calling it. How do 
> I finally remove the code?
> 
> David Pennington