From: "Dennis Katsonis" Newsgroups: comp.os.msdos.djgpp Subject: allegro program crashes on exit Date: Thu, 28 Dec 2000 08:20:43 +1100 Organization: Netspace Internet Lines: 28 Message-ID: <92f5e4$171d$1@otis.netspace.net.au> NNTP-Posting-Host: dialup-t2-72.melbourne.netspace.net.au X-Trace: otis.netspace.net.au 978000133 39981 210.15.192.72 (28 Dec 2000 10:42:13 GMT) X-Complaints-To: usenet AT otis DOT netspace DOT net DOT au NNTP-Posting-Date: Thu, 28 Dec 2000 10:42:13 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I am writing a game using the Allegro graphics library ver 3.12 for DJGPP The game works fine but for one problem. It seems to cause the MS-DOS prompt to crash occasionally when I exit the game with windows giving me a dialog box about an illegal operation. The faulting component is given as VMM(01)+0000FE7. Most of the time the program exits fine, but if I start another prompt at a later time, it may exit with this error. If I recompile, it may then work fine or may not. In DOS mode it seems to work fine. Any help appreciated on what it may be, or how I can track the problem. It may be some sort of memory management problem, but I have looked through my code. The last few lines of code in the program are set_gfx_mode(GFX_TEXT,80,25,0,0); textptr +=__djgpp_conventional_base; __djgpp_nearptr_enable(); memcpy(textptr,data[endscreen].dat,4000); __djgpp_nearptr_disable(); gotoxy(0,23); return(0); where textptr is previously set using the command char unsigned*textptr = (byte*)0xB8000;