Engine execution exception...

Started by
5 comments, last by fastcall22 15 years, 8 months ago
Hi! I have this program written in C++ (using Visual Studio 2003) which sometimes throws this strange "System.EngineExecution exception. I've read this could be caused by a bug in the .NET framework, how can I fix it? must I reinstall the framework? Is it possible I'm having a buffer overrun that causes this? [smile]
Advertisement
It sounds like you aren't using C++ at all, but instead C++/CLI, which is a slightly different language designed to be used with the .NET framework. Such an exception could be caused by a buffer overrun. Have fun tracking it down :P
Mike Popoloski | Journal | SlimDX
I guess it also can explain why my application sometimes disappears without a trace :(
BoundsChecker does not do the work here... (It points out "memory overrun" but doesn't tell me where i made the overrun)
Do you happen to know a different tool (NOT purify) which can help me?
thanks :)
Do you have a specific reason for using C++/CLI? It's usually not the best choice of language for new projects. If you switch to C#, you won't run into these sorts of problems at all.
Mike Popoloski | Journal | SlimDX
I've once had this strange problem before, but manifested itself when an entity corrupted itself... :?

Here's a few things you could try:

1. Run your program in debug mode by clicking "Debug"->"Step into". Go to the breakpoints pane ("debug"->"windows"->"breakpoints"), and click "new"->"new data breakpoint". Here it will ask you what address to monitor and it will notify you when it changes. Specify the address in where it would raise the exception, and see if it prematurely changes, such as at the overrun location.

2. Step through your program step-by-step (using F10 (step-over) and F11 (step-into)), and monitor values in your local and auto windows ("Debug"->"Windows"->"Autos"/"Locals").

3. Turn on CRT memory leak detections.

This helped me catch an odd buffer overrun that I found when a random game entity crashed on itself. Turns out that my keyboard state monitor array wasn't large enough to fit all of the values of the keyboard. :|
Quote:Original post by _fastcall
I've once had this strange problem before, but manifested itself when an entity corrupted itself... :?

Here's a few things you could try:

1. Run your program in debug mode by clicking "Debug"->"Step into". Go to the breakpoints pane ("debug"->"windows"->"breakpoints"), and click "new"->"new data breakpoint". Here it will ask you what address to monitor and it will notify you when it changes. Specify the address in where it would raise the exception, and see if it prematurely changes, such as at the overrun location.

2. Step through your program step-by-step (using F10 (step-over) and F11 (step-into)), and monitor values in your local and auto windows ("Debug"->"Windows"->"Autos"/"Locals").

3. Turn on CRT memory leak detections.

This helped me catch an odd buffer overrun that I found when a random game entity crashed on itself. Turns out that my keyboard state monitor array wasn't large enough to fit all of the values of the keyboard. :|



Ok, thanks! :)
But this "Memory overrun" occurs before my code is executed...
It's somewhere in the DLLs...

And Mike, I can't switch to C# now... it's way too late :)
Another helpful tip is to look at the "call stack" pane and the "threads" pane when it crashes. You'll be able to find out which DLL (and thread) your application crashes by looking at these panes. You can find these panes under "Debug"->"Windows". If all else fails, try looking for any suspicious warning messages when you are compiling it.

This topic is closed to new replies.

Advertisement