f



Instance of dialog subclass survives, even the panic button...

Hi Dolphiners,

I have an problem with an instance of an dialog subclass
(BiPosKalkDialog). It woun't disapear on normal view::close.
The panic button doesn't work either. My investigtion on holders of
the instance was not successful. The only place where one is stored is
inside an instance method of another dialog subclass
(BiPosKasseDialog). The store position is an local variable there and
there are no instances of BiPosKasseDialog left.

What can I do to get rid of this &%=A7=A7"$% ?

Cheers,
Klaus
0
klausk
11/21/2009 10:29:21 AM
comp.lang.smalltalk.dolphin 3769 articles. 0 followers. Post Follow

14 Replies
330 Views

Similar Articles

[PageSpeed] 0

Hi Klaus,

BiPosKasseDialog allInstances do: [:bpDialog| bpDialog become: String new].
I'm not sure about the side effects doing this to a MS-Windows Dialog. 
But it's worth a try.

cjb

klausk schrieb:
> Hi Dolphiners,
> 
> I have an problem with an instance of an dialog subclass
> (BiPosKalkDialog). It woun't disapear on normal view::close.
> The panic button doesn't work either. My investigtion on holders of
> the instance was not successful. The only place where one is stored is
> inside an instance method of another dialog subclass
> (BiPosKasseDialog). The store position is an local variable there and
> there are no instances of BiPosKasseDialog left.
> 
> What can I do to get rid of this &%��"$% ?
> 
> Cheers,
> Klaus
0
Christoph
11/21/2009 10:43:21 AM
Christoph J. Bachinger schrieb:
> BiPosKasseDialog allInstances do: [:bpDialog| bpDialog become: String new].
> I'm not sure about the side effects doing this to a MS-Windows Dialog. 
Using a DeafObject or DeadObject instead of a string might be an 
alternative.

CU,


Udo
0
Udo
11/21/2009 11:00:20 AM
On 21 Nov., 12:00, Udo Schneider <Udo.Schnei...@homeaddress.de> wrote:
> Christoph J. Bachinger schrieb:> BiPosKasseDialog allInstances do: [:bpDialog| bpDialog become: String new].
> > I'm not sure about the side effects doing this to a MS-Windows Dialog.
>
> Using a DeafObject or DeadObject instead of a string might be an
> alternative.
>
> CU,
>
> Udo

thank you for quick response.

I tried that allready getting an "'Incompatible class instance
shapes'" error.

(tried UndefinedObject, and as you suggested DeafObject)

More ideas? ;-))

Cheers,
Klaus
0
klausk
11/21/2009 11:15:21 AM
On 21 nov, 09:15, klausk <i...@kirchhoff-edv.de> wrote:
> On 21 Nov., 12:00, Udo Schneider <Udo.Schnei...@homeaddress.de> wrote:
>
> > Christoph J. Bachinger schrieb:> BiPosKasseDialog allInstances do: [:bpDialog| bpDialog become: String new].
> > > I'm not sure about the side effects doing this to a MS-Windows Dialog.
>
> > Using a DeafObject or DeadObject instead of a string might be an
> > alternative.
>
> > CU,
>
> > Udo
>
> thank you for quick response.
>
> I tried that allready getting an "'Incompatible class instance
> shapes'" error.
>
> (tried UndefinedObject, and as you suggested DeafObject)
>
> More ideas? ;-))
>
> Cheers,
> Klaus

Did you take a look at the Processes that are running in your image
(use the ProcessMonitor)?

May be that view or presenter is referenced by some process in your
image.

Just an idea...

Regards,
Bruno
0
Bruno
11/21/2009 12:26:52 PM
On 21 Nov., 13:26, Bruno Buzzi Brasesco <bruno.brase...@gmail.com>
wrote:
> On 21 nov, 09:15, klausk <i...@kirchhoff-edv.de> wrote:
>
>
>
>
>
> > On 21 Nov., 12:00, Udo Schneider <Udo.Schnei...@homeaddress.de> wrote:
>
> > > Christoph J. Bachinger schrieb:> BiPosKasseDialog allInstances do: [:bpDialog| bpDialog become: String new].
> > > > I'm not sure about the side effects doing this to a MS-Windows Dialog.
>
> > > Using a DeafObject or DeadObject instead of a string might be an
> > > alternative.
>
> > > CU,
>
> > > Udo
>
> > thank you for quick response.
>
> > I tried that allready getting an "'Incompatible class instance
> > shapes'" error.
>
> > (tried UndefinedObject, and as you suggested DeafObject)
>
> > More ideas? ;-))
>
> > Cheers,
> > Klaus
>
> Did you take a look at the Processes that are running in your image
> (use the ProcessMonitor)?
>
> May be that view or presenter is referenced by some process in your
> image.
>
> Just an idea...
>
> Regards,
> Bruno- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Very good idea! I saw one dead main holding a reference to my problem.
But in the process monitor is nothing unusaly to see. After a "panik"
there are only 5 processes running...

Cheers,
Klaus
0
klausk
11/21/2009 12:57:22 PM
Have you investigated using #allReferences with the evil instance?
:)

Cheers
  Sebastian

On 21 nov, 07:29, klausk <i...@kirchhoff-edv.de> wrote:
> Hi Dolphiners,
>
> I have an problem with an instance of an dialog subclass
> (BiPosKalkDialog). It woun't disapear on normal view::close.
> The panic button doesn't work either. My investigtion on holders of
> the instance was not successful. The only place where one is stored is
> inside an instance method of another dialog subclass
> (BiPosKasseDialog). The store position is an local variable there and
> there are no instances of BiPosKasseDialog left.
>
> What can I do to get rid of this &%=A7=A7"$% ?
>
> Cheers,
> Klaus

0
GallegO
11/21/2009 3:40:26 PM
On 21 nov, 10:57, klausk <i...@kirchhoff-edv.de> wrote:
> On 21 Nov., 13:26, Bruno Buzzi Brasesco <bruno.brase...@gmail.com>
> wrote:
>
>
>
>
>
> > On 21 nov, 09:15, klausk <i...@kirchhoff-edv.de> wrote:
>
> > > On 21 Nov., 12:00, Udo Schneider <Udo.Schnei...@homeaddress.de> wrote:
>
> > > > Christoph J. Bachinger schrieb:> BiPosKasseDialog allInstances do: [:bpDialog| bpDialog become: String new].
> > > > > I'm not sure about the side effects doing this to a MS-Windows Dialog.
>
> > > > Using a DeafObject or DeadObject instead of a string might be an
> > > > alternative.
>
> > > > CU,
>
> > > > Udo
>
> > > thank you for quick response.
>
> > > I tried that allready getting an "'Incompatible class instance
> > > shapes'" error.
>
> > > (tried UndefinedObject, and as you suggested DeafObject)
>
> > > More ideas? ;-))
>
> > > Cheers,
> > > Klaus
>
> > Did you take a look at the Processes that are running in your image
> > (use the ProcessMonitor)?
>
> > May be that view or presenter is referenced by some process in your
> > image.
>
> > Just an idea...
>
> > Regards,
> > Bruno- Zitierten Text ausblenden -
>
> > - Zitierten Text anzeigen -
>
> Very good idea! I saw one dead main holding a reference to my problem.
> But in the process monitor is nothing unusaly to see. After a "panik"
> there are only 5 processes running...
>
> Cheers,
> Klaus

The "dead process" is still listed in ProcessMonitor ?
"SAVE IMAGE FIRST"
aDeadProcess become: String new.

Regards,
Bruno
0
Bruno
11/21/2009 9:18:37 PM
On 21 nov, 19:18, Bruno Buzzi Brasesco <bruno.brase...@gmail.com>
wrote:
> On 21 nov, 10:57, klausk <i...@kirchhoff-edv.de> wrote:
>
>
>
>
>
> > On 21 Nov., 13:26, Bruno Buzzi Brasesco <bruno.brase...@gmail.com>
> > wrote:
>
> > > On 21 nov, 09:15, klausk <i...@kirchhoff-edv.de> wrote:
>
> > > > On 21 Nov., 12:00, Udo Schneider <Udo.Schnei...@homeaddress.de> wrote:
>
> > > > > Christoph J. Bachinger schrieb:> BiPosKasseDialog allInstances do: [:bpDialog| bpDialog become: String new].
> > > > > > I'm not sure about the side effects doing this to a MS-Windows Dialog.
>
> > > > > Using a DeafObject or DeadObject instead of a string might be an
> > > > > alternative.
>
> > > > > CU,
>
> > > > > Udo
>
> > > > thank you for quick response.
>
> > > > I tried that allready getting an "'Incompatible class instance
> > > > shapes'" error.
>
> > > > (tried UndefinedObject, and as you suggested DeafObject)
>
> > > > More ideas? ;-))
>
> > > > Cheers,
> > > > Klaus
>
> > > Did you take a look at the Processes that are running in your image
> > > (use the ProcessMonitor)?
>
> > > May be that view or presenter is referenced by some process in your
> > > image.
>
> > > Just an idea...
>
> > > Regards,
> > > Bruno- Zitierten Text ausblenden -
>
> > > - Zitierten Text anzeigen -
>
> > Very good idea! I saw one dead main holding a reference to my problem.
> > But in the process monitor is nothing unusaly to see. After a "panik"
> > there are only 5 processes running...
>
> > Cheers,
> > Klaus
>
> The "dead process" is still listed in ProcessMonitor ?
> "SAVE IMAGE FIRST"
> aDeadProcess become: String new.
>
> Regards,
> Bruno

After that the GarbageCollector should collect the process and your
"evil object". -MemoryManager current primCompact-

Regards,
Bruno
0
Bruno
11/21/2009 9:21:02 PM
On 21 Nov., 22:21, Bruno Buzzi Brasesco <bruno.brase...@gmail.com>
wrote:
> On 21 nov, 19:18, Bruno Buzzi Brasesco <bruno.brase...@gmail.com>
> wrote:
>
>
>
>
>
> > On 21 nov, 10:57, klausk <i...@kirchhoff-edv.de> wrote:
>
> > > On 21 Nov., 13:26, Bruno Buzzi Brasesco <bruno.brase...@gmail.com>
> > > wrote:
>
> > > > On 21 nov, 09:15, klausk <i...@kirchhoff-edv.de> wrote:
>
> > > > > On 21 Nov., 12:00, Udo Schneider <Udo.Schnei...@homeaddress.de> wrote:
>
> > > > > > Christoph J. Bachinger schrieb:> BiPosKasseDialog allInstances do: [:bpDialog| bpDialog become: String new].
> > > > > > > I'm not sure about the side effects doing this to a MS-Windows Dialog.
>
> > > > > > Using a DeafObject or DeadObject instead of a string might be an
> > > > > > alternative.
>
> > > > > > CU,
>
> > > > > > Udo
>
> > > > > thank you for quick response.
>
> > > > > I tried that allready getting an "'Incompatible class instance
> > > > > shapes'" error.
>
> > > > > (tried UndefinedObject, and as you suggested DeafObject)
>
> > > > > More ideas? ;-))
>
> > > > > Cheers,
> > > > > Klaus
>
> > > > Did you take a look at the Processes that are running in your image
> > > > (use the ProcessMonitor)?
>
> > > > May be that view or presenter is referenced by some process in your
> > > > image.
>
> > > > Just an idea...
>
> > > > Regards,
> > > > Bruno- Zitierten Text ausblenden -
>
> > > > - Zitierten Text anzeigen -
>
> > > Very good idea! I saw one dead main holding a reference to my problem.
> > > But in the process monitor is nothing unusaly to see. After a "panik"
> > > there are only 5 processes running...
>
> > > Cheers,
> > > Klaus
>
> > The "dead process" is still listed in ProcessMonitor ?
> > "SAVE IMAGE FIRST"
> > aDeadProcess become: String new.
>
> > Regards,
> > Bruno
>
> After that the GarbageCollector should collect the process and your
> "evil object". -MemoryManager current primCompact-
>
> Regards,
> Bruno- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Hi,

the evil instance is gone. My fault was using becomeAn: this can fail.
The simple become: worked.

Thank you all,
Klaus
0
klausk
11/22/2009 7:08:27 PM
Klaus,

> the evil instance is gone. My fault was using becomeAn: this can fail.
> The simple become: worked.

Yes, #becomeAs: simply switches the class pointer of an object. Because 
of this the initial class and the eventual class must have the same 
"shapes" otherwise all hell would break loose.

You need to be careful with using #become: to fix these dangling object 
issues. You run the risk of damaging the image in rather hidden ways 
that don't necessarily pop up until later (it depends on the original 
cause of the problem, of course). Make sure you backup the image first.

In many cases the simplest and most reliable approach is to save all 
your packages (or version them into STS) and then reload into a fresh image.

Best regards

Andy Bower
0
Andy
11/23/2009 5:21:09 PM
Andy,

thanks for background informations. I make an backup of the whole
project path every day to make shure image and repository fitts
together...

The bad thing about this is, those hidden damages sleep untill the
time comes to deliver a new version. This may be a couple of month. I
can tell so because this happened in early spring this year.

To build up a new image sounds good, but my project (a POS incl.
warehouse management) was started 2004 and has now a size and
complexity that this takes me a week of work, I guess.

Btw, I am willing to spend money on a new version D7.32 and D7.64,
too.My pain threshold is on about $1000.

Klaus
0
klausk
11/24/2009 8:22:51 AM
Klaus,

> To build up a new image sounds good, but my project (a POS incl.
> warehouse management) was started 2004 and has now a size and
> complexity that this takes me a week of work, I guess.

That doesn't sound too good. Ideally, you should get the project into a 
state where all the Dolphin packages are versioned into STS and placed 
into an STS Project so that they can be loaded into a fresh image with a 
single click. Of course, there must be significant obstacles to this 
idea otherwise you'd be doing this already?

As other readers will remember I'm still an advocate of working within a 
single persistent image but I always like to make sure I can get from a 
fresh image back to my current state in a couple minutes if needs be. 
This is especially necessary before deployment. Other people like to 
load packages into a fresh image each time Dolphin starts, to make sure 
everything is "squeaky clean" all of the time.

> Btw, I am willing to spend money on a new version D7.32 and D7.64,
> too.My pain threshold is on about $1000.

Thanks, that's great. I've added your message to my collection of pledge 
e-mails. I'll be contacting everyone who has responded in the next few 
days to let them know the results.

Best regards

Andy Bower
0
Andy
11/24/2009 10:15:36 AM
On 24 nov, 08:15, Andy Bower <bo...@SnipThisObject-arts.com> wrote:
> Klaus,
>
> > To build up a new image sounds good, but my project (a POS incl.
> > warehouse management) was started 2004 and has now a size and
> > complexity that this takes me a week of work, I guess.
>
> That doesn't sound too good. Ideally, you should get the project into a
> state where all the Dolphin packages are versioned into STS and placed
> into an STS Project so that they can be loaded into a fresh image with a
> single click. Of course, there must be significant obstacles to this
> idea otherwise you'd be doing this already?
>
> As other readers will remember I'm still an advocate of working within a
> single persistent image but I always like to make sure I can get from a
> fresh image back to my current state in a couple minutes if needs be.
> This is especially necessary before deployment. Other people like to
> load packages into a fresh image each time Dolphin starts, to make sure
> everything is "squeaky clean" all of the time.
>
> > Btw, I am willing to spend money on a new version D7.32 and D7.64,
> > too.My pain threshold is on about $1000.
>
> Thanks, that's great. I've added your message to my collection of pledge
> e-mails. I'll be contacting everyone who has responded in the next few
> days to let them know the results.
>
> Best regards
>
> Andy Bower

May be you can save the packages to the local disk, then rename
Professional.* (chg, img, sml) and the copy a fresh image in the same
directory.
The try to load the saved packages in the new fresh image. I did this
a couple of time and it works fine.

And for D7 i will collaborate with $500 (i already sent you an email
Andy).

Regards,
Bruno
0
Bruno
11/24/2009 1:38:48 PM
Bruno,

> And for D7 i will collaborate with $500 (i already sent you an email
> Andy).

Thanks, I got it. It was the first to arrive. Well done!

Best regards

Andy Bower
0
Andy
11/24/2009 1:56:34 PM
Reply: