ormohrbh@ubvmsd.cc.buffalo.edu (Richard Ohrbach) (02/12/91)
I am having the following problem: I developed a program on computer #1 (8088 machine) which contained the following sequence of code: SetViewPort (#1); write some stuff in this viewport SetViewPort (#2); write some stuff in this viewport The program worked fine when initially developed, and it still does on computer #2 (80386) as well as another 8086 machine, but the program does not work on computer #1 or two other 8088 machines. The problem is this: when ViewPort #2 is initialized, the program returns back GraphResult of -11 ("GraphicsError"), and the stuff that is supposed to be done in ViewPort #2 is done instead in ViewPort #1. So, ViewPort #2 is not recognized. I called Borland tech support, who suggested that the problem was memory corruption. Following their advice, I turned Range Checking ON, and, unfortunately, that did not catch the corruption. I then commented out every procedure in the program that was not essential to this particular section of code, and still the problem remains. My question, as a non-professional programmer, is what is the best thing to do at this point, given that the code runs on some machines and not others (and the code has to be able to run on the 8088 machine) ? Should I rewrite the unit from the ground up, or is their some other less painful way to solve this problem? Thanks for any help... Richard Ohrbach University at Buffalo ormohrbh@ubvms.bitnet
F0O@psuvm.psu.edu (02/12/91)
In article <59173@eerie.acsu.Buffalo.EDU>, ormohrbh@ubvmsd.cc.buffalo.edu (Richard Ohrbach) says: >I am having the following problem: > I developed a program on computer #1 (8088 machine) which contained >the following sequence of code: SetViewPort (#1); > write some stuff in this viewport > SetViewPort (#2); > write some stuff in this viewport >The program worked fine when initially developed, and it still does on >computer #2 (80386) as well as another 8086 machine, but the program does >not work on computer #1 or two other 8088 machines. The problem is this: >when ViewPort #2 is initialized, the program returns back GraphResult of >-11 ("GraphicsError"), and the stuff that is supposed to be done in >ViewPort #2 is done instead in ViewPort #1. So, ViewPort #2 is not >recognized. If you have not modified the program since it did work on computer #1, and if nothing has changed in computer #1's hardware configuration, then I'd say it's a problem with the hardware in the machine. You could also copy the TURBO.EXE file from your master disks to the hard disk. Maybe it was corrupted somehow. Good luck, [Tim]
dave@tygra.UUCP (David Conrad) (02/17/91)
In article <59173@eerie.acsu.Buffalo.EDU> ormohrbh@ubvmsd.cc.buffalo.edu writes: >I am having the following problem: > I developed a program on computer #1 (8088 machine) which contained >the following sequence of code: SetViewPort (#1); > write some stuff in this viewport > SetViewPort (#2); > write some stuff in this viewport > >The program worked fine when initially developed, and it still does on >computer #2 (80386) as well as another 8086 machine, but the program does >not work on computer #1 or two other 8088 machines. The problem is this: >when ViewPort #2 is initialized, the program returns back GraphResult of >-11 ("GraphicsError"), and the stuff that is supposed to be done in >ViewPort #2 is done instead in ViewPort #1. So, ViewPort #2 is not >recognized. > >I called Borland tech support, who suggested that the problem was memory >corruption. Following their advice, I turned Range Checking ON, and, >unfortunately, that did not catch the corruption. I then commented out >every procedure in the program that was not essential to this particular >section of code, and still the problem remains. > >My question, as a non-professional programmer, is what is the best thing to >do at this point, given that the code runs on some machines and not others >(and the code has to be able to run on the 8088 machine) ? Should I >rewrite the unit from the ground up, or is their some other less painful >way to solve this problem? > >Thanks for any help... >Richard Ohrbach >University at Buffalo >ormohrbh@ubvms.bitnet Try this: setViewPort (1000, 1000, 2000, 2000, ClipOn); Crashes, right? Because it's off the screen. I'll bet the two machines it works on have EGA's or VGA's, and the one it doesn't work on has a CGA. If your code can't set coordinates relative to getMaxX/Y, then it should make sure the screen is large enough for the absolute coordinates you're using. Kinda scary that the Tech. Support people didn't think of this. Guess they've got everyone with brains working on one-upping Microsoft in the bulletted-list-of-useless-features game. -- David R. Conrad tygra!dave@sharkey.cc.umich.edu -- = CAT-TALK Conferencing Network, Computer Conferencing and File Archive = - 1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new' - = as a login id. AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET") = E-MAIL Address: dave@DDMI.COM