Dramatic increase of invalid window handles with 313 upgrade 
Author Message
 Dramatic increase of invalid window handles with 313 upgrade

I am still making tests but it seems to be a fact. There is something with the 313 upgrade that
invalidates window handles much more frequently than in previous versions. This is true for an
upgraded development image (inc. WindowBuilder) but also for a clean image.

False forwarding of invalid file handles has already been reported by James Foster on CS and you can
trace the appearance of such "goodies" with the patch to notify: below.
With this modification, open a large number of class browsers by holding down Ctrl-B. Then check the
error.log file.
In the development image, it only needs 11 opened class browsers to run into problems.
An upgraded runtime (built from scratch via SLLs) also displays this behavior (not with class
browsers, of course).
Any hint would be helpful.

- Thomas

!NotificationManager methods !
notify: aWinMessage
        "Private - Translate a host system event into the appropriate
         message sent to the window specified in the event."
    | receiver selector newWindow |
#modifiedByTM. "17 Oct 1997 - 17:23:35 see below"
        "If the handle of the event's destination window is not present
         in the windows instance variable, it may be a newly created
         window (getting a WmCreate message)"
    ( receiver := self findWindow: aWinMessage hwnd ) isNil ifTrue: [
        ( newWindow := self class newWindow ) notNil ifTrue: [
            receiver := newWindow handle: ( WindowHandle fromInteger: aWinMessage hwnd ) ] ].
    selector := self selectorFor: aWinMessage msg.
    ( receiver isNil or: [ selector isNil ] ) ifTrue: [ ^nil ].

"TM: log code to track invalid handles. Error reported by James Foster on CS
 Oct 14, 1997"
    receiver handle isValid ifFalse:
            [
            Smalltalk logError: 'receiver handle not valid: ' ,
            receiver asString , ' ' ,
        aWinMessage hwnd asString , ' ' ,
            receiver handle asString , ' ' ,
            (UserLibrary isWindow: receiver handle ) asString ].

    ^receiver
        perform: selector
        with: aWinMessage wparam
        with: aWinMessage lparam! !

--
___________________________________________________________________

Scientific Software Development  -  Internet: http://www.*-*-*.com/



Wed, 18 Jun 1902 08:00:00 GMT  
 Dramatic increase of invalid window handles with 313 upgrade
When I had that problem a couple years ago (as reported on CompuServe), I
found the problem using a patch to NotificationManager>>notify: similar to
yours. I believe I put in a halt or wrote a walkback to the log so I could
see more immediately what was precipitating the error. This helped me find
the problem in my code rather than in VSE. (My problem turned out to be one
where I was calling a window/widget create method twice.)

I've tried reproducing your problem by opening a number of class browsers. I
can open 36-38 browsers and then get a reasonable error dialog "Out of
system resources." What OS are you using? My problem was reproduced on Win95
much easier than on WinNT. Were there any other changes besides upgrading
from 3.1.2x?

James Foster
Lutheran Health Systems

------------------------------------------

Quote:

>I am still making tests but it seems to be a fact. There is something with

the 313 upgrade that
Quote:
>invalidates window handles much more frequently than in previous versions.
This is true for an
>upgraded development image (inc. WindowBuilder) but also for a clean image.

>False forwarding of invalid file handles has already been reported by James

Foster on CS and you can
Quote:
>trace the appearance of such "goodies" with the patch to notify: below.
>With this modification, open a large number of class browsers by holding

down Ctrl-B. Then check the
Quote:
>error.log file.
>In the development image, it only needs 11 opened class browsers to run
into problems.
>An upgraded runtime (built from scratch via SLLs) also displays this

behavior (not with class
Quote:
>browsers, of course).
>Any hint would be helpful.

>- Thomas

>!NotificationManager methods !
>notify: aWinMessage
>        "Private - Translate a host system event into the appropriate
>         message sent to the window specified in the event."
>    | receiver selector newWindow |
>#modifiedByTM. "17 Oct 1997 - 17:23:35 see below"
>        "If the handle of the event's destination window is not present
>         in the windows instance variable, it may be a newly created
>         window (getting a WmCreate message)"
>    ( receiver := self findWindow: aWinMessage hwnd ) isNil ifTrue: [
>        ( newWindow := self class newWindow ) notNil ifTrue: [
>            receiver := newWindow handle: ( WindowHandle fromInteger:

aWinMessage hwnd ) ] ].

- Show quoted text -

Quote:
>    selector := self selectorFor: aWinMessage msg.
>    ( receiver isNil or: [ selector isNil ] ) ifTrue: [ ^nil ].

>"TM: log code to track invalid handles. Error reported by James Foster on
CS
> Oct 14, 1997"
>    receiver handle isValid ifFalse:
>            [
>            Smalltalk logError: 'receiver handle not valid: ' ,
>            receiver asString , ' ' ,
>        aWinMessage hwnd asString , ' ' ,
>            receiver handle asString , ' ' ,
>            (UserLibrary isWindow: receiver handle ) asString ].

>    ^receiver
>        perform: selector
>        with: aWinMessage wparam
>        with: aWinMessage lparam! !

>--
>___________________________________________________________________

>Scientific Software Development  -  Internet: http://www.atlasti.de



Wed, 18 Jun 1902 08:00:00 GMT  
 Dramatic increase of invalid window handles with 313 upgrade
Thomas,

FWIW, I can verify the problem.  I installed your trace method into a clean 313 image on Win98 and
started getting invalid handles after opening as few as 3 ClassHierachyBrowsers.  Similar results with
ClassBrowsers.  Nothing else to report so far.

John
--
tec4 systems inc.
"The right tools to manage your commercial insurance lines."



Wed, 18 Jun 1902 08:00:00 GMT  
 Dramatic increase of invalid window handles with 313 upgrade
James,
take a close look at the notify: patch I provided. It mentiones you as the one who reported this bug
in an older version.
I wonder that you cannot recreate the problem as we can easily on very different machines running on
W95 (Pentium) and on W98 (Pentium II).
We have also found the one file which is the source for these problems: It is the new virtual
machine, vvm31w.dll. When reverting back to the old one we use (dated April 4, 1996, size 192000) the
problems are gone.

I have no problem using the older one, as I cannot think of any feature which could outweigh the
invalid handle problem. However, what conflicts could arise from mixing the recent 313 source code
with the old VM? And what are we missing not to be able to use the enlarged buffer for COM objetcs? We
want to use a number of ActiveX automation servers in our next release.

- Thomas


: When I had that problem a couple years ago (as reported on CompuServe), I
: found the problem using a patch to NotificationManager>>notify: similar to
: yours. I believe I put in a halt or wrote a walkback to the log so I could
: see more immediately what was precipitating the error. This helped me find
: the problem in my code rather than in VSE. (My problem turned out to be one
: where I was calling a window/widget create method twice.)

: I've tried reproducing your problem by opening a number of class browsers. I
: can open 36-38 browsers and then get a reasonable error dialog "Out of
: system resources." What OS are you using? My problem was reproduced on Win95
: much easier than on WinNT. Were there any other changes besides upgrading
: from 3.1.2x?

: James Foster
: Lutheran Health Systems

: ------------------------------------------

:>I am still making tests but it seems to be a fact. There is something with
: the 313 upgrade that
:>invalidates window handles much more frequently than in previous versions.
: This is true for an
:>upgraded development image (inc. WindowBuilder) but also for a clean image.
:>
:>False forwarding of invalid file handles has already been reported by James
: Foster on CS and you can
:>trace the appearance of such "goodies" with the patch to notify: below.
:>With this modification, open a large number of class browsers by holding
: down Ctrl-B. Then check the

--
___________________________________________________________________

Scientific Software Development  -  Internet: http://www.atlasti.de



Wed, 18 Jun 1902 08:00:00 GMT  
 Dramatic increase of invalid window handles with 313 upgrade
John,
thanks a lot for confirming. Do you have any idea how we could help the people at ParcPlace to get
another VM release compiled ?-)

- Thomas
: Thomas,

: FWIW, I can verify the problem.  I installed your trace method into a clean 313 image on Win98 and
: started getting invalid handles after opening as few as 3 ClassHierachyBrowsers.  Similar results with
: ClassBrowsers.  Nothing else to report so far.

: John
: --
: tec4 systems inc.
: "The right tools to manage your commercial insurance lines."

--
___________________________________________________________________

Scientific Software Development  -  Internet: http://www.atlasti.de



Wed, 18 Jun 1902 08:00:00 GMT  
 Dramatic increase of invalid window handles with 313 upgrade
The problems with invaild window handles and VM 312 and 313 have been confirmed by ObjectShare. They
are trying to locate the changes between 311 and 312 that are causing these problems.
Lets hope for a clean 313 in the not too far future....

- Thomas

: John,
: thanks a lot for confirming. Do you have any idea how we could help the people at ParcPlace to get
: another VM release compiled ?-)

: - Thomas

: : Thomas,

: : FWIW, I can verify the problem.  I installed your trace method into a clean 313 image on Win98 and
: : started getting invalid handles after opening as few as 3 ClassHierachyBrowsers.  Similar results with
: : ClassBrowsers.  Nothing else to report so far.

: : John
: : --
: : tec4 systems inc.
: : "The right tools to manage your commercial insurance lines."

: --
: ___________________________________________________________________

: Scientific Software Development  -  Internet: http://www.atlasti.de

--
___________________________________________________________________

Scientific Software Development  -  Internet: http://www.atlasti.de



Wed, 18 Jun 1902 08:00:00 GMT  
 Dramatic increase of invalid window handles with 313 upgrade
We've confirmed that the problem occurs with the VSE 3.1.2 and 3.1.3 VM
on Windows 95 and 98 but not on Windows NT. It does not occur in the VSE
3.1.1 VM. We're investigating the changes made to the VM between 3.1.1
and 3.1.2 that would lead to the problem.  

Given the fixes in the 3.1.2 and 3.1.3 VMs prevent a large number of
crashes, and that this issue hasn't caused reported problems in most
user's GUIs, we recommend users continue to use the 3.1.3 VM.  No one
has reported this problem in the three years that 3.1.2 has been out.

The symptom is that window handles are responding to "UserLibrary
isWindow: handle asParameter" with false instead of true.  (This is used
in WindowHandle>>isValid.)  But in every other respect that we've seen,
they're working.  For instance, you can execute the following calls and
they work correctly:

UserLibrary isWindowVisible: handle asParameter
UserLibrary bringWindowToTop: handle asParameter
UserLibrary getParent: handle asParameter

AND, locating the windows, the widgets display and operate correctly.
we've also tried passing the window handles to

UserLibrary destroyWindow: self handle asParameter

and they stopped working.

We've found this affects a small percentage of widgets -- out of 95
ListPanes, in one instance, 3 of their handles were answering false.
When doing our tests with the ClassHierarchyBrowser, we've seen the
problem with RadioButton, GroupPane, ListPane, TextPaneControl, and
TopPanes.

______________________________________________________________________
Kevin Greek, Ph.D.
Developer Support Engineer
ObjectShare (formerly ParcPlace-Digitalk), Inc., Santa Clara, CA
Phone: 800-727-2555                                  FAX: 408-749-8060

______________________________________________________________________



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. NDN:Info Dylan digest V2 #313

2. PEP 313 - Roman numeral literals

3. Upgrade Causes Increase EXE Size

4. Error(6): cif$fileclose the handle is invalid

5. cif$fileopen invalid handle In XP synchronized offline folder

6. err:$$$$(1) #6 Error$filewrite: The handle is invalid

7. err.$$$(1) #6 Error:cif$filewrite The handle is invalid

8. Error(6) cif$FileClose The Handle is invalid.

9. Assertion Message - Restore Handle is invalid

10. Error Code 6: Invalid handle

11. INVALID HANDLE error when compiling?

12. invalid handle number (-213)

 

 
Powered by phpBB® Forum Software