在开发环境之外运行程序时程序崩溃 [英] Program crashes when running it outside dev environment

查看:66
本文介绍了在开发环境之外运行程序时程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual C 2005来开发我的程序。其中一个特别是

在非常具体和难以复制的情况下崩溃,更糟糕的是因为它只会在运行时崩溃 - 开发 - 作为exe,

不是来自Debug选项。如果我尝试在

崩溃程序上启动调试,它将在调试器打开之前关闭。关于我应该如何进行的任何

建议?在此先感谢。

解决方案

z写道:

|我使用Visual C 2005来开发我的程序。一个特别是

|在非常具体和难以复制的情况下崩溃,制作了

|更糟糕的是,它只会在运行时崩溃 - 在开发时 - 作为

|一个exe,而不是Debug选项。如果我尝试在

|上启动调试崩溃的程序,它将在调试器打开之前关闭。任何

|关于我应该如何进行的建议?提前致谢。


听起来好像你应该首先关注那些处理那些

特定情况的代码。


-

Morris Dovey

DeSoto Solar

德索托,爱荷华州美国
http://www.iedu.com/DeSoto/



听起来好像你应该首先关注那些处理那些

非常具体的情况的代码。



哎呀,也许''具体''是一个坏词。我的意思是在一个不同的代码点上发生'取决于程序的编译方式'。

通常在fopen / fread操作的中间,但是当它不是吗?b $ b只是喜欢在任何地方碰撞。


z写道:
< blockquote class =post_quotes>
我使用Visual C 2005来开发我的程序。其中一个特别是

在非常具体和难以复制的情况下崩溃,更糟糕的是因为它只会在运行时崩溃 - 开发 - 作为exe,

不是来自Debug选项。如果我尝试在

崩溃程序上启动调试,它将在调试器打开之前关闭。关于我应该如何进行的任何

建议?在此先感谢。



1)您应该学习如何调试。第一条规则是:

阅读文档。

当发生崩溃时,您的编译器可以使用其调试器

。设置它,然后你

将找到崩溃的原因。
2)当你找到崩溃的源代码时,你可能会

注意到你正在经历bug的后果,

不是bug本身的直接原因。谨防快速

结论。


I use Visual C 2005 to develop my programs. One in particular is
crashing in very specific and hard to replicate situations, made worse
by the fact it only crashes when run -outside- the dev - as an exe,
not from the Debug option. If I try to launch the debug on the
crashing program, it''ll close before the debugger opens. Any
suggestions as to how I should proceed? Thanks in advance.

解决方案

z wrote:
| I use Visual C 2005 to develop my programs. One in particular is
| crashing in very specific and hard to replicate situations, made
| worse by the fact it only crashes when run -outside- the dev - as
| an exe, not from the Debug option. If I try to launch the debug on
| the crashing program, it''ll close before the debugger opens. Any
| suggestions as to how I should proceed? Thanks in advance.

It sounds as if you should first focus on the code that handles those
"very specific situations".

--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto/


It sounds as if you should first focus on the code that handles those
"very specific situations".

Oops, maybe ''specific'' was a bad word. I meant ''ocurring in a
different point of code depending on how the program is compiled''.
Usually in the middle of a fopen/fread operation, but when it isn''t it
just likes to crash anywhere it feels like.


z wrote:

I use Visual C 2005 to develop my programs. One in particular is
crashing in very specific and hard to replicate situations, made worse
by the fact it only crashes when run -outside- the dev - as an exe,
not from the Debug option. If I try to launch the debug on the
crashing program, it''ll close before the debugger opens. Any
suggestions as to how I should proceed? Thanks in advance.

1) You should learn how to debug. The first rule is:
READ THE DOCUMENTATION.
Your compiler can spring into action with its debugger
when a crash occurs. Set it up to do that, and then you
will find the reason of the crash.
2) When you find the source code of the crash you will probably
notice that you are experiencing the consequences of the bug,
not a direct cause of the bug itself. Beware of quick
conclusions.


这篇关于在开发环境之外运行程序时程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆