From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Page fault Segmentation fault Date: 10 Nov 2000 00:42:40 -0800 Organization: InterWorld Communications Lines: 37 Sender: nate AT mercury DOT st DOT hmc DOT edu Message-ID: <831ywkdxq7.fsf@mercury.st.hmc.edu> References: <8ug7ed$rok$1 AT orion DOT inrets DOT fr> NNTP-Posting-Host: mercury.st.hmc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: nntp1.interworld.net 973845760 73423 134.173.57.219 (10 Nov 2000 08:42:40 GMT) X-Complaints-To: usenet AT news DOT interworld DOT net NNTP-Posting-Date: Fri, 10 Nov 2000 08:42:40 +0000 (UTC) User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Jean-Pierre GHYS" writes: > i use DJGPP under DOS 6.0 with 16 Mo of memory and vhen i use somme POINTER > to passe data to other foction the programme will Crasch > with this message > > Exiting due to SIGSEGV segmentation fault > page fault at EIP =000192e,error 0006 > > and many other information on Registers > > and the message show me the line of the programe > > int fonction(int *alim,.......) > { > > ----- >>> *alim = valeur .....; > } > > PSE help > > if i use the same programe under WIN95 it works !!!! It's very likely that `alim' is NULL. It is an error to dereference a NULL pointer; however, Windows doesn't provide the necessary functionality to detect it. (Your value got written into some strange place in memory, and you're just lucky it didn't hit anything vital.) When using DOS with CWSDPMI, however, it does. This is a Good Thing since it lets you find your bugs earlier and more easily. Get one of DJGPP's debuggers and start hunting for the reason why your pointer is NULL. The FAQ has more info. -- Nate Eldredge neldredge AT hmc DOT edu