jinbruce627
jinbruce627

Reputation: 133

MFC app crash - release vs debug

I wrote an MFC application that have functions of downloading files.

But I met a problem that crashes app. In windows 7 there is no problem. And also in debug mode it works fine.

In windows xp, in release mode, the app crashes sometimes. I wonder what is the problem, and want your help.

Regards.

Upvotes: 0

Views: 1711

Answers (3)

zar
zar

Reputation: 12247

This can sometimes happen, the key is to debug the release version and find where it crashes and fix the issue.

The instructions to debug a release version is here: http://msdn.microsoft.com/en-us/library/fsk896zz.aspx

Upvotes: 1

Coder
Coder

Reputation: 3715

In debug version variables are initialized to some values by default, under release they can be anything. Also some layout can change.

Try running app verifier, it catches 99% of bugs where something overwrites something else.

Upvotes: 2

TridenT
TridenT

Reputation: 4909

You should first compare the Release and Debug configuration.
There is no simple evidences to say why it craches, but it should NOT crash in Release if it works in Debug.

My first impression is that the code is different between the 2 configurations.
For example, a pre-processor define as #ifdef must compile a code block that ios not present in other configuration.
Check this point, and compare your two configuration details, it will help !

Upvotes: 0

Related Questions