From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp Subject: Re: SIGSEGV page fault DOS but not Windows Date: Mon, 30 Oct 2000 16:45:22 Organization: Aspen Technology, Inc. Lines: 28 Message-ID: <39fda5a2.sandmann@clio.rice.edu> References: <8tknba$509$1 AT plutonium DOT btinternet DOT com> NNTP-Posting-Host: dcloan.hou.aspentech.com X-Trace: selma.aspentech.com 972946456 21263 10.32.115.107 (30 Oct 2000 22:54:16 GMT) X-Complaints-To: postmaster AT aspentech DOT com NNTP-Posting-Date: 30 Oct 2000 22:54:16 GMT X-NewsEditor: ED-1.5.8 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > I have a program which runs fine in a Windows 'DOS window' but produces a > page fault when run in true W98 DOS. .. > Any ideas on how I can fix this? I have looked at the FAQ and there are some > topics that may be relevant but I am not sure which ones really apply to > this problem - I think the problem is more likely to be with CWSDPMI than > DJGPP and I suspect it is to do with the configuration of the server or > perhaps EMM386 but I don't know enough about the ins and outs of DMPI (or > PC's generally) to work out how to resolve it! 1) Get r5 2) issue the command cwsdpmi -x before running your program 3) run the program If the problem goes away then this is a null pointer problem (and a bug in your program). The -x qualifier (this is a one pass test only) disables the 1.0 extensions (and allows Windows developed buggy programs to run). You can also permanently disable null pointer checking capabilities using cwsparam. This feature was specifically added for people who develop under Windows and think ignorance is bliss. It could be the null pointer is due to a malloc that failed (do you check all these?) Have you checked the amount of memory you see using go32-v2? How does this compare to the amount you expect to allocate?