From: Eric Lange Newsgroups: comp.os.msdos.djgpp Subject: Re: Help with errors Date: Tue, 08 Jul 1997 10:27:56 -0700 Organization: E-mu Systems, Inc. Lines: 36 Message-ID: <33C2789C.5887@emu.com> References: <33c206fc DOT 8853443 AT netnews DOT worldnet DOT att DOT net> Reply-To: ericl AT emu DOT com NNTP-Posting-Host: 192.136.8.26 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Eric Liao wrote: > > OK, I finally ported my game to DJGPP, and it compiled, and > made an executable. When I run the executable, though it crashes, and > the SYMIFY output looks like this: > > General Protection Fault at eip=00005f4a > eax=a5dd0e43 ebx=0024d0e0 ecx=00003e01 edx=a5de8d7c esi=00000054 > edi=0004bac0 > ebp=0024ba8c esp=0024b9d0 program=C:\FLAME\FLAME.EXE > cs: sel=00a7 base=82ac4000 limit=0047bfff > ds: sel=00af base=82ac4000 limit=0047bfff > es: sel=00af base=82ac4000 limit=0047bfff > fs: sel=0087 base=0000df40 limit=0000ffff > gs: sel=00bf base=00000000 limit=ffffffff > ss: sel=00af base=82ac4000 limit=0047bfff > > Call frame traceback EIPs: > 0x00005f4a _write_numbers__Fv+542, line 352 of flame.cc > 0x0000c82c _main+100, line 1507 of flame.cc > 0x0000cf56 ___crt1_startup+138 > > I look at the line it refers to and all it is a declaration of > a temporary int to equal an element in an array like > int temp=map[desty*320+destx]; > where desty and destx are just coords. Map is a 64K array. What > possible error could this be? I thought it might be some kind of > stack error so I used stubedit and gave it a 2 meg stack but it still > had the same error. Any help would be appreciated. Is it possible that desty or destx have erroneous values? A moderately huge value of desty would overrun the bounds of your DS, which is 4.7MB in size. This would easily cause a GPF. Try stepping through using GDB when you get to this point. Eric Lange