From: su-lin DOT liao AT worldnet DOT att DOT net (Eric Liao) Newsgroups: comp.os.msdos.djgpp Subject: Re: Help with errors Date: Tue, 08 Jul 1997 22:10:28 GMT Organization: AT&T WorldNet Services Lines: 45 Message-ID: <33c2ba55.6066342@netnews.worldnet.att.net> References: <33c206fc DOT 8853443 AT netnews DOT worldnet DOT att DOT net> <33C2789C DOT 5887 AT emu DOT com> NNTP-Posting-Host: 207.147.170.226 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Tue, 08 Jul 1997 10:27:56 -0700, Eric Lange wrote: >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 I'm pretty sure destx and desty are correct, because my game runs when I compile it in Borland Turbo C++ 3.1. I'm still new to DJGPP, though. I'll try using GDB I guess. Eric Liao