visual studio 2008 solution release version runtime fatal error

后端 未结 1 928
独厮守ぢ
独厮守ぢ 2021-01-28 11:04

I have a Visual Studio 2008 solution which consists of some projects and uses dll\'s with theirs\' headers. In the debug version it (the solution) works really well. And in rele

相关标签:
1条回答
  • 2021-01-28 11:32

    I have seen this happen many times before. In almost every single case the problem was found to be an out-of-bounds error when writing to an array or other data structure. In other cases, an uninitialized variable was being used.

    You have a bug in your code. That is certain. When you build under Debug settings, the compiler does a whole lot of stuff for you that masks certain types of problems. The compiler will write code that zero-initializes some stuff, masking uninitialized variable problems.

    First thing I wold try is cranking up the warning levels to their highest settings. You should be doing this all the time anyways. This will very often reveal the problem. Just be sure to fix the problems the compiler tells you about. Don't mask them with #pragmas or chintzy casts. Next step through your code to isolate the problem. This can be difficult and time consuming, but there's a silver lining. Whatever the problem is, the likelyhood of you repeating that mistake is inversely proportional to how long and how hard it is to identify and fix the bug. :)

    0 讨论(0)
提交回复
热议问题