"Tank" <Kn****@hotmail.com> wrote in message
I'm getting the above on a simple fopen() in a production program. I
know that fopen calls malloc, but what would cause this and how do I
fix it? Have I hit some kind of # files open limit or something?
Comment out all your code except the call to fopen(), and see if it still
fails. If it does then there is probably something wrong with the file or
the path to it.
Other posters have suggested that you may have corrupted the malloc()
system. Replace the call to fopen() with a call to malloc(). If the malloc()
fails, then this is almost certainly the problem. Unfortunately if the
malloc() succeeds you haven't proved that the malloc() system is not
corrupt.
Comment in code until the bug reappears. Comment out code again until you
have isolated a small section which seems to cause the bug. This will
probably lead you to the problem.