当无需调试在VS2010中运行发布版本无法正常工作
我遇到以下问题:
我写的程序在C ++使用VS2010。当与运行调试版本工作正常/无VS.调试当我启动生成的可执行文件直接它也可以。
I write program in c++ using VS2010. Debug build works properly when run with/without debugging in VS. When I launch built executable directly it also works.
发布版本的作品。
不幸的是,程序不,当我在VS -without debugging-运行发布版本工作。窗口创建,然后快速程序崩溃(没有任何错误消息)。由于它崩溃时运行无需调试,我不知道如何识别是什么原因导致的问题。
Unfortunately, program does not work when I run release build in VS -without debugging-. Window is created and then program crashes quickly (without any error message). Since it crashes when run without debugging I don't know how to identify what causes the problem.
任何想法可能会导致什么呢?感谢:)
Any ideas what might be causing this? Thanks :)
这似乎很可能是因为某种内存错误/损坏,只是发生在调试器工作正常的。
It seems most likely you have some sort of memory error/corruption that just happens to work ok in the debugger.
您可以尝试使用COUTS多远/在那里去世隔离,或者(如果你能移植到Linux或Valgrind的免费),尝试像净化的工具。
You can try using couts to isolate how far/where it dies, or try a tool like Purify (or valgrind for free if you can port to Linux).