Crashes in release mode but not in debug
-
My C++ project (embedded real-time stuff) has run nicely for years. Now I split off some of the code to a separate exe. I always test in debug mode, so I didn't worry much about release mode. So when the user starts it in release mode, as soon as the exe is called it comes with "The application has requested runtime to terminate it in an unusual way". I have seen this before, it was the exe throwing an unhandled exception. But the thing has more exception handlers than code now, and it runs fine in debug. What can be causing this? I checked the project properties, there is nothing surprising in there. Maybe someone can give me a tip what I should be looking for?
------------- Bibo ergo sum
-
My C++ project (embedded real-time stuff) has run nicely for years. Now I split off some of the code to a separate exe. I always test in debug mode, so I didn't worry much about release mode. So when the user starts it in release mode, as soon as the exe is called it comes with "The application has requested runtime to terminate it in an unusual way". I have seen this before, it was the exe throwing an unhandled exception. But the thing has more exception handlers than code now, and it runs fine in debug. What can be causing this? I checked the project properties, there is nothing surprising in there. Maybe someone can give me a tip what I should be looking for?
------------- Bibo ergo sum
This is just what you need: http://www.codeproject.com/KB/debug/survivereleasever.aspx[^] (Surviving the Release Version By Joseph M. Newcomer)
-
My C++ project (embedded real-time stuff) has run nicely for years. Now I split off some of the code to a separate exe. I always test in debug mode, so I didn't worry much about release mode. So when the user starts it in release mode, as soon as the exe is called it comes with "The application has requested runtime to terminate it in an unusual way". I have seen this before, it was the exe throwing an unhandled exception. But the thing has more exception handlers than code now, and it runs fine in debug. What can be causing this? I checked the project properties, there is nothing surprising in there. Maybe someone can give me a tip what I should be looking for?
------------- Bibo ergo sum
-
My C++ project (embedded real-time stuff) has run nicely for years. Now I split off some of the code to a separate exe. I always test in debug mode, so I didn't worry much about release mode. So when the user starts it in release mode, as soon as the exe is called it comes with "The application has requested runtime to terminate it in an unusual way". I have seen this before, it was the exe throwing an unhandled exception. But the thing has more exception handlers than code now, and it runs fine in debug. What can be causing this? I checked the project properties, there is nothing surprising in there. Maybe someone can give me a tip what I should be looking for?
------------- Bibo ergo sum
-
My C++ project (embedded real-time stuff) has run nicely for years. Now I split off some of the code to a separate exe. I always test in debug mode, so I didn't worry much about release mode. So when the user starts it in release mode, as soon as the exe is called it comes with "The application has requested runtime to terminate it in an unusual way". I have seen this before, it was the exe throwing an unhandled exception. But the thing has more exception handlers than code now, and it runs fine in debug. What can be causing this? I checked the project properties, there is nothing surprising in there. Maybe someone can give me a tip what I should be looking for?
------------- Bibo ergo sum
That was very kind of all of you - I now know that you really can debug in release mode - but the problem was something else entirely. When I first made my exe it was a dll project, then I decided to make an exe after all, and since I was in a hurry I did this by copying and renaming, then changing the properties to fit. Anyway, I ended up with both main and InitInstance. Debug runs main, it seems, and release takes InitInstance if it can find one, or maybe main is optimised out. I commented InitInstance out and suddenly all is well.
------------- Bibo ergo sum