|
From: Arto H. <art...@ut...> - 2002-06-14 16:32:47
|
Hello, I am having some serious trouble running my application on Windows XP systems. I'm compiling it with MinGW, and I use both MSVCRT and W32API (this is a GUI application). The code runs stable on 95, 98, NT and W2k, and presumably ME also (and the GTK GUI version runs stable on *NIX systems). What I see is, I think, most likely heap corruption, related to MSVCRT malloc/calloc/free. No other explanation I really can't see for crashes in code that runs stable everywhere else. (For example, I do "ptr = calloc (1, 12)", and the returned ptr most certainly is not NULL, this is checked. Accessing the first 4 bytes of the memory works, but (reading drwatson log), I see access to the next 4 bytes as causing the crash) The crashes are reproducible, and always happen in the same places if I do certain actions. However, if I do different (often far more complex) things in the app, the same code, where crashes occur, run stable. Browsing with google and in MSDN, I managed to find information that linking in multiple CRT libs will cause funny results, so I started investigating on that. Looking at my exe's headers, there is only one MSVCRT (although it is mentioned twice, with different symbols). Looking at Dr. Watson's crash log, I see no other CRT libs (there is RPCRT, but apparently that is RPC RT; then there is MSCFT, of which I don't know about). Any advice, thoughts, what should I do. I will examine what is going on more thoroughly tonight, but I don't feel very optimistic in finding anything... -- arto |