Date: Mon, 1 Dec 1997 18:38:15 -0600 (CST) From: Andrew Deren To: George Foot cc: djgpp AT delorie DOT com Subject: Re: Debuging In-Reply-To: <65tqpb$qhb$2@news.ox.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Thanks, but someone pointed before that the problem was with constructors of the classes. I had some global instacnes of some classes where some fields where initialized to null and they were calling text_length to calculate something, in win95 dpmi host it's fine to do that but not in cwsdpmi. So I just changed the allegro text_length functions and put: if (!text) return 0; and the program works fine now. On 1 Dec 1997, George Foot wrote: > On Mon, 1 Dec 1997 04:40:46 GMT in comp.os.msdos.djgpp Andrew Deren wrote: > > : I have a relatively large C++ program and it works fine when using Windows > : 95 DPMI host but when using pure DOS, it crashes. I tried using debuger in > : RHIDE but the program crashes even before reaching to the main function. > : And the error is in text_length function which is a part of allegro. > : Does anyone know how to find where that error occurs. When I try using > : stepping in debugger, the first time I use step I get the SIGSEG error. > > Do smaller programs work? Do C programs work? Does the compiler work? > > Allegro shouldn't be doing anything before the start of your main > function, so it looks like the stack trace you saw was corrupted. If > other programs (especially standard C programs) work, this points > perhaps to the C++ features which can be run before the main function > -- I don't know too much about this. You'll probably have to give > more information about what sort of C++ specialities your program is > (ab)using ;). > > Presumably you're using the standard compiling and linking tools > (i.e. not rebuilt wrongly); in this case, your programs should run as > reliably as the compiler itself. Does the compiler work from your DOS > setup? > > -- > george DOT foot AT merton DOT oxford DOT ac DOT uk > ,,, (0 0) +-------------oOO----(_)-------------------+ | Andrew Deren | | aderen AT eecs DOT uic DOT edu | | www.eecs.uic.edu/~aderen/ader/main.html | +-------------------------oOO--------------+ || || ooO Ooo