Mail Archives: djgpp/1999/12/10/18:16:41
Hans-Bernhard Broeker wrote in message <82o3bs$gnk AT acp3bf DOT knirsch DOT de>...
>Chris Underwood (underwoodc AT logica DOT nospam DOT com) wrote:
>[...]
>> When the program crashes, it occasionally destroyes the text
>> files it happens to have open, either replacing them with a series of
>> repeating bytes or blanking them completely.
>[...]
>
>As Nate and Eli already pointed out, your program just may be
>corrupting the disk cache. OTOH, even that alone shouldn't effect the
It's possible, but extremely unlikely. Not all of the code is mine of
course - there's the third party mp3 player library (Xaudio), which could
potentially be doing nasty things. I've never come across anything like this
before though, and I've been using the Borland compiler (at work) for some
time now.
>Another thing to keep in mind: off the shelf, a DJGPP program wouldn't
>normally be able to commit this kind of trespass, due to the memory
>protection offered by protected mode.
This is something which is new to me under DOS. I presume it should also
never take down Windows, since any memory accesses outside my program bounds
should cause a SIGSEGV or similar. It can crash Windows though. In this
case, I don't even think it's the 3rd party mp3 library at fault, because
apparently it was built using DjGPP.
> Does your program use the
>nearptr method, by any chance? If so, stop doing that, and the problem
>might just go away... nearptr *is* fundamentally unsafe, after all.
Hmm, not sure. I'm familiar with the concept of near and far pointers, but
it sounds like you're talking about something subtly different that I don't
know about here. Could I be using the nearptr you're talking about
inadvertantly?
In time I'll fix all (ok, most) of the bugs, and it won't self-corrupt its
database files anymore. Until then, is there anything I can do to save
myself backing up and restoring the entire project tree lots? It would make
the development a bit easier, and a bit less scary!
By the way, where can I get the Allegro mp3 decoder library from? I'm
thinking of changing over, due to some dubious properties of the one I'm
using.
Chris
- Raw text -