Mail Archives: djgpp/2000/06/27/16:00:37
radsmail AT juno DOT com (Radical NetSurfer) wrote in
<gvvhls8pqkvcavrc6odvj2ud1mnuuj553h AT 4ax DOT com>:
>n 27 Jun 2000 18:18:53 GMT, "doug" <deleveld AT dds DOT nl> wrote:
>
>>Radical NetSurfer <radsmail AT juno DOT com> schreef in artikel
>><s97hls8hlhbikfhjkaut11p3lavr480eq2 AT 4ax DOT com>...
>>> PLEASE HELP ME UNDERSTAND THE FOLLOWING:
>>>
>>> Why is it I find that most things compiled from a Win95 DOS shell
>>> appear to work just fine... if allegro is used, the graphics and
>>> mouse support is perfect....
>>> do into pure MS-DOS 6.22 and try to run the EXACT same program
>>> and you get CORE-DUMPS and the MOUSE will HANG-THE-COMPUTER!
...
>
>Elaborate a little more, and it could be enlightening for all of us.
>What examples provide clues as to when/why stability issues come into
>play....
>It was fine until I started doing:
> destroy_bitmap(da_bmp);
> da_bmp=NULL;
>
>in DOS...this seems VERY NAUGHTY INDEED!
you have a very interesting attitude.
basically, the dpmi server under windows 9x will not properly catch some
memory related exceptions. whereas cwsdpmi will.
if your program seems to work under win95 but not in dos, this is a
telltale sign that you have a memory related bug somewhere in your
program.
my guess is you are accessing da_bmp after you have destroyed it and set
it to NULL. (btw, catching these kinds of programming errors _IS_ the
reason for setting pointers which no longer point to valid storage to
NULL.)
for further enlightenment, you can test the following program under dos
and in a dos window under windows 9x.
#include <stdlib.h>
int main(void) {
char* nullpointer = NULL;
*nullpointer = 'c';
return 0;
}
Sinan.
--
--------------------------------
A. Sinan Unur
http://www.unur.com/
- Raw text -