[comp.os.os2] Urgent Help Needed for PM Windows Programming

lima@nixsin.UUCP (Arthur Lim) (12/04/89)

H E L P !!!  Somebody !!!

I am currently writing a software in PM that requires dynamic creation of
windows. The problem I have is that the program *bombs* out when I try to
change the size of the window with the WinSetWindowPos() function. The 
error message I got was SYS1942 "The program attempted to reference storage
outside the limits of a stack segment.".

In the first version of the prototype, I used arrays to store the info for
the windows I need to create. This works perfectly with no errors. In the
process of enhancing the prototype, I switched to linked lists instead and 
that's where I get *thrown* out. The flow of the program is virtually intact.
Only the source of where I get the window info is different.

From the debugging, I narrowed down the cause to the function stated above.
The values passed to the functions are all correct. From CodeView, I
observed that the subroutine call stack has propogated some 26 (or more)
levels deep. As this is error is generated from the system function, I am 
not able to control it (or can I ?)

BTW, the stack defined for the program is 8K.

I would appreciate if someone can give me some insights into the cause and
solution to the problem. I need it rather urgently to proceed with the 
prototype.


Many thanks in advance for any tips, hints, or better yet solutions.


-- 
----------------------------------------------------
Arthur Lim  Nixdorf Regional HQ Pte Ltd, Singapore
!usa: mcvax!unido!nixpbe!lim.sin
usa : uunet!philabs!linus!nixbur!lim.sin