[VW 7.4.0] [Bug] ApplicationWindows with null handles are treated as valid (and closeAndUnschedule leaves them hanging around)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[VW 7.4.0] [Bug] ApplicationWindows with null handles are treated as valid (and closeAndUnschedule leaves them hanging around)

Stew MacLean

Hi,

 

According to the comment within

 

Window>>isInvalid

            "Answer if the window is incomplete or should not be displayed"

            ^self subclassResponsibility

 

ApplicationWindow>>isInvalid

 

Should be

 

^component isNil or: [handle isNil]

 

 

Not just

 

^component isNil.

 

This has implications when calling allScheduledWindowsDo: aBlock, and purgeDeadWindows.

 

I discovered this as in spite of calling closeAndUnschedule, an ApplicationWindow is mysteriously being referenced within the window register. I have followed the code through in development and it removes the window ok, but in runtime it doesn’t for some reason???? Changing isInvalid as above, avoids any graphic operations with dire consequences on a window with a dud handle.

 

Cheers,

 

Stewart

Reply | Threaded
Open this post in threaded view
|

RE: [VW 7.4.0] [Bug] ApplicationWindows with null handles are treated as valid (and closeAndUnschedule leaves them hanging around)

mark.b.ballard
Message
I also reported something like this quite awhile ago.  The WindowManager class has two selectors
    purgeInvalidWindows
    purgeDeadWindows
 
The purgeDeadWindows add the handle isNil (actually it add key is nil, which handles the case where the handle is nil or the key of the handle is nil).
 
I don't understand why the standard image is using the less checking of  isInvalid vs the stricter checking in purgeDeadWindows?
-----Original Message-----
From: Stewart MacLean [mailto:[hidden email]]
Sent: Thursday, February 15, 2007 11:42 PM
To: [hidden email]
Subject: [VW 7.4.0] [Bug] ApplicationWindows with null handles are treated as valid (and closeAndUnschedule leaves them hanging around)

Hi,

 

According to the comment within

 

Window>>isInvalid

            "Answer if the window is incomplete or should not be displayed"

            ^self subclassResponsibility

 

ApplicationWindow>>isInvalid

 

Should be

 

^component isNil or: [handle isNil]

 

 

Not just

 

^component isNil.

 

This has implications when calling allScheduledWindowsDo: aBlock, and purgeDeadWindows.

 

I discovered this as in spite of calling closeAndUnschedule, an ApplicationWindow is mysteriously being referenced within the window register. I have followed the code through in development and it removes the window ok, but in runtime it doesn’t for some reason???? Changing isInvalid as above, avoids any graphic operations with dire consequences on a window with a dud handle.

 

Cheers,

 

Stewart

Reply | Threaded
Open this post in threaded view
|

RE: [VW 7.4.0] [Bug] ApplicationWindows with null handles are treated as valid (and closeAndUnschedule leaves them hanging around)

Stew MacLean
Message

Hi Mark,

 

Ok, thanks for correcting me on the distinction between Invalid and Dead windows.

 

I also, don’t understand why there is a distinction, given the comment within Window>>isInvalid.

 

I also don’t understand how the window that I’ve closedAndUnscheduled is still being referenced by the WindowManager, which is how I ran into this issue in the first place.

 

Cheers,

 

Stewart

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent:
17 February 2007 2:46 a.m.
To: [hidden email]; [hidden email]
Subject: RE: [VW 7.4.0] [Bug] ApplicationWindows with null handles are treated as valid (and closeAndUnschedule leaves them hanging around)

 

I also reported something like this quite awhile ago.  The WindowManager class has two selectors

    purgeInvalidWindows

    purgeDeadWindows

 

The purgeDeadWindows add the handle isNil (actually it add key is nil, which handles the case where the handle is nil or the key of the handle is nil).

 

I don't understand why the standard image is using the less checking of  isInvalid vs the stricter checking in purgeDeadWindows?

-----Original Message-----
From: Stewart MacLean [mailto:[hidden email]]
Sent:
Thursday, February 15, 2007 11:42 PM
To: [hidden email]
Subject: [VW 7.4.0] [Bug] ApplicationWindows with null handles are treated as valid (and closeAndUnschedule leaves them hanging around)

Hi,

 

According to the comment within

 

Window>>isInvalid

          "Answer if the window is incomplete or should not be displayed"

          ^self subclassResponsibility

 

ApplicationWindow>>isInvalid

 

Should be

 

^component isNil or: [handle isNil]

 

 

Not just

 

^component isNil.

 

This has implications when calling allScheduledWindowsDo: aBlock, and purgeDeadWindows.

 

I discovered this as in spite of calling closeAndUnschedule, an ApplicationWindow is mysteriously being referenced within the window register. I have followed the code through in development and it removes the window ok, but in runtime it doesn’t for some reason???? Changing isInvalid as above, avoids any graphic operations with dire consequences on a window with a dud handle.

 

Cheers,

 

Stewart