TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Phil Crown
from: hugo landsman
date: 1995-06-11 15:09:06
subject: Borland v2.0 bug?

hi Phil,

 PC> Anybody seen anything obviously wrong with the following code?  It
 PC> works fine under EMX 0.9a, but I get an ACCESS VIOLATION when
 PC> stepping thru the debugger with BCOS2 v2.0.  BCOS2 crashes in main()
 PC> at the sp = save_screen( sp ) line.

 PC> typedef struct _ScreenS {

 PC>   UCHAR           CellStr[50][264];

I wouldn't do that: even this old ET4000 does 60x132 text mode:-)  Make it
a pointer and allocate what's needed.

 PC>   USHORT          curRow;
 PC>   USHORT          curCol;
 PC>   VIOCURSORINFO   Cursor;
 PC>   VIOMODEINFO     vi;

 PC> } ScreenS;

 PC> // Prototypes
 PC> ScreenS   save_screen     ( ScreenS );

Sounds like the stack is too small for those screens.  Either save them on
the heap or use a huge stack (emx defaults to 32K with -mprobe on all
libraries for automatic growth).

regards,
         hugo
* Origin: (2:283/608.5)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 283/608 6 1 512 396/1 270/101 105/103 42 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.