Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
13 Views

debug version works release version doesn't

Jump to solution

In developing my project I've come to a point where the x64 Debug version works and it works great. But the x64 Release version launches and then gives me a message saying my application has stopped working and it doesn't resume. I've compiled both with all the warning/remark flags set and resolved. I've run all the MSVS 2013 tests that I know about and no signs arise.  I'm running a Win 10 Enterprise x64 version with all the patches applied. I have an Intel i7-4770 cpu running at 3.4GHz and 32GB of RAM. I have 3TB of disk storage and using only about 30% of that. Hardware is not a problem and even if I leaked like a sieve, I couldn't leak enough to stop it from working right off the bat. My project has 45 subroutines/procedures and I'm using a lot of heap space for arrays but I've set the heap size to a large number. I've uploaded a pdf of the screen at first startup.

0 Kudos

Accepted Solutions
Highlighted
13 Views

You are running a Windows Forms (dialog) based application. One of the usual mistakes that presents this symptom (working in Debug, but not in release), happens when you port a 32-bit application to 64-bit application.

The root cause for this is usually not type/kind arguments properly.

On 32-bit build, many of the interface argument sizes (kinds) are interchangable

sizeof(DWORD)==sizeof(INTEGER)==sizeof(HANDLE)==sizeof(...)

However on a port of the code to 64-bit the above does not hold true.

Debug build sometimes work (by accident) due to Debug build possibly zeroing out undefined data (e.g. the high 32-bits of a now 64-bit variable).

Jim Dempsey

View solution in original post

0 Kudos
3 Replies
Highlighted
13 Views

The program obviously worked for a bit What I would do is insert some logging code as it makes progress and see at what point the error occurs. You could also try building a Debug configuration with optimization (you'll need to disable the Stack Check option under Run Time, though) and see where it is at the point of error. The debugger may also tell you what kind of error it is..

0 Kudos
Highlighted
14 Views

You are running a Windows Forms (dialog) based application. One of the usual mistakes that presents this symptom (working in Debug, but not in release), happens when you port a 32-bit application to 64-bit application.

The root cause for this is usually not type/kind arguments properly.

On 32-bit build, many of the interface argument sizes (kinds) are interchangable

sizeof(DWORD)==sizeof(INTEGER)==sizeof(HANDLE)==sizeof(...)

However on a port of the code to 64-bit the above does not hold true.

Debug build sometimes work (by accident) due to Debug build possibly zeroing out undefined data (e.g. the high 32-bits of a now 64-bit variable).

Jim Dempsey

View solution in original post

0 Kudos
Highlighted
New Contributor I
13 Views

Jim,

I thought I was careful to specify the kind= everywhere but I'll check it out. Steve's suggestion led me to optimization issues.

Brooks

0 Kudos