delorie.com/archives/browse.cgi | search |
From: | dcasale AT my-deja DOT com |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: free() error |
Date: | Fri, 13 Oct 2000 01:04:14 GMT |
Organization: | Deja.com - Before you buy. |
Lines: | 45 |
Message-ID: | <8s5n2b$go9$1@nnrp1.deja.com> |
References: | <39e36135 AT news DOT vogel DOT pl> |
NNTP-Posting-Host: | 199.249.234.30 |
X-Article-Creation-Date: | Fri Oct 13 01:04:14 2000 GMT |
X-Http-User-Agent: | Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) |
X-Http-Proxy: | 1.1 x71.deja.com:80 (Squid/1.1.22) for client 199.249.234.30 |
X-MyDeja-Info: | XMYDJUIDdcasale |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
In article <39e36135 AT news DOT vogel DOT pl>, "Chaos" <chengin AT alpha DOT net DOT pl> wrote: > From time to time (meaning quite randomly) I have my program crash leaving > such information: > > ebp=0009e748 esp=0009e73c program=C:\MOJE\PROGRAMY\CARZ\V3.EXE > cs: sel=00a7 base=83564000 limit=ffaeafff > ds: sel=00af base=83564000 limit=ffaeafff > es: sel=00af base=83564000 limit=ffaeafff > fs: sel=0087 base=00007ae0 limit=0000ffff > gs: sel=00bf base=00000000 limit=0010ffff > ss: sel=00af base=83564000 limit=ffaeafff > App stack: [0009e7d0..0001e7d0] Exceptn stack: [0001e6b8..0001c778] > > Call frame traceback EIPs: > 0x000051a0 _free+172 > 0x00002dec _main+2004, line 962 of V3.c > 0x00003ece ___crt1_startup+174 > > C:\Moje\programy\Carz>symify V3.exe > > On what side the eror/bug hides: mine or free function? > Program crash's usually in Win98 DOSbox. But the strangest is that it > blowes himself away random (once it works OK and some other time it > always leaves with "registers prompt"). Can U tell me what can I do 2 > fix it? I recently had a very similar problem. My program seemed to work fine in debug mode, but when I compiled a release version it would crash every time with a similar error in free. It turned out that I had forgotten to initialize some buffer size information. Check and make sure that _all_ of your variables have been initialized, and that you're not deleting objects which have already been deleted. Run your program under a debugger or stick printf's everywhere and carefully examine the state of your variables. See if any of them have been corrupted or uninitialized. Damon Casale, damon AT redshift DOT com Just a friendly pointer... Sent via Deja.com http://www.deja.com/ Before you buy.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |