debug version works, release version sometimes fails 
Author Message
 debug version works, release version sometimes fails

Hi, Happy New Year.

Can someone tell me how to begin diagnosing this problem?

(I'm using vc++ 6 and Win98se for development and testing, and
my project is an MFC sdi app with mfc dynamically linked to it.)

The release configuration executable of my project runs fine if I run it
by using either Start/Run or using Windows Explorer and pointing at the
.exe file in the project's release folder. (A required third party dll is
in the release folder, too.)

But I get the Windows error "This program has performed an illegal
opperation" if I do either of the following:

1. Install my program using Install Shield / Windows Installer, and
running the program by using one of the shortcuts to the program with the
required third party dll in the path, or using Start/Run or Windows
Explorer with the required third party dll in the same folder as the exe
file.

2. Copy the .exe to any folder other than the project's release folder,
and run it using either Start/Run or Windows Explorer. (with the third
party dll in the same folder.)

The debug configuration executable runs fine in all cases.

How can I isolate the problem?

Thanks,
Dan



Sun, 26 Jun 2005 17:25:43 GMT  
 debug version works, release version sometimes fails
When I've had problems like this, I've usually had to put a bunch
of AfxMessageBox messages at the start (usually after blocks of code)
and used that to determine where the problem was.

Brian.


Quote:
> Hi, Happy New Year.

> Can someone tell me how to begin diagnosing this problem?

> (I'm using vc++ 6 and Win98se for development and testing, and
> my project is an mfc sdi app with mfc dynamically linked to it.)

> The release configuration executable of my project runs fine if I run
it
> by using either Start/Run or using Windows Explorer and pointing at the
> .exe file in the project's release folder. (A required third party dll
is
> in the release folder, too.)

> But I get the Windows error "This program has performed an illegal
> opperation" if I do either of the following:

> 1. Install my program using Install Shield / Windows Installer, and
> running the program by using one of the shortcuts to the program with
the
> required third party dll in the path, or using Start/Run or Windows
> Explorer with the required third party dll in the same folder as the
exe
> file.

> 2. Copy the .exe to any folder other than the project's release folder,
> and run it using either Start/Run or Windows Explorer. (with the third
> party dll in the same folder.)

> The debug configuration executable runs fine in all cases.

> How can I isolate the problem?

> Thanks,
> Dan



Sun, 26 Jun 2005 17:40:45 GMT  
 debug version works, release version sometimes fails
Take a look at this essay by Joe Newcomer.

http://www3.pgh.net/~newcomer/debug_release.htm

TFM3

Note: Spam-resistant e-mail address

Quote:

> Hi, Happy New Year.

> Can someone tell me how to begin diagnosing this problem?

> (I'm using vc++ 6 and Win98se for development and testing, and
> my project is an mfc sdi app with mfc dynamically linked to it.)

> The release configuration executable of my project runs fine if I run it
> by using either Start/Run or using Windows Explorer and pointing at the
> .exe file in the project's release folder. (A required third party dll is
> in the release folder, too.)

> But I get the Windows error "This program has performed an illegal
> opperation" if I do either of the following:

> 1. Install my program using Install Shield / Windows Installer, and
> running the program by using one of the shortcuts to the program with the
> required third party dll in the path, or using Start/Run or Windows
> Explorer with the required third party dll in the same folder as the exe
> file.

> 2. Copy the .exe to any folder other than the project's release folder,
> and run it using either Start/Run or Windows Explorer. (with the third
> party dll in the same folder.)

> The debug configuration executable runs fine in all cases.

> How can I isolate the problem?

> Thanks,
> Dan



Sun, 26 Jun 2005 17:43:32 GMT  
 debug version works, release version sometimes fails
: When I've had problems like this, I've usually had to put a bunch
: of AfxMessageBox messages at the start (usually after blocks of code)
: and used that to determine where the problem was.

: Brian.

Brian,

I've used that approach in the past. I'll use it as a last resort.

Someone suggested adding symbols to my release. That way I can run the
.exe within Visual Studio and debug it.

Thanks,
Dan



Sun, 26 Jun 2005 19:31:21 GMT  
 debug version works, release version sometimes fails
See my essay "Surviving the Release Version" on my MVP Tips site. There are a number of
classic errors that only show up in the release version. Most are fundamental bugs that
miss getting caught in the debug version for reasons I explain.

InstallShield is irrelevant.

The most likely cause is user-defined window messages with incorrect handlers.
                                joe

Quote:

>Hi, Happy New Year.

>Can someone tell me how to begin diagnosing this problem?

>(I'm using vc++ 6 and Win98se for development and testing, and
>my project is an mfc sdi app with mfc dynamically linked to it.)

>The release configuration executable of my project runs fine if I run it
>by using either Start/Run or using Windows Explorer and pointing at the
>.exe file in the project's release folder. (A required third party dll is
>in the release folder, too.)

>But I get the Windows error "This program has performed an illegal
>opperation" if I do either of the following:

>1. Install my program using Install Shield / Windows Installer, and
>running the program by using one of the shortcuts to the program with the
>required third party dll in the path, or using Start/Run or Windows
>Explorer with the required third party dll in the same folder as the exe
>file.

>2. Copy the .exe to any folder other than the project's release folder,
>and run it using either Start/Run or Windows Explorer. (with the third
>party dll in the same folder.)

>The debug configuration executable runs fine in all cases.

>How can I isolate the problem?

>Thanks,
>Dan

Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm


Sun, 26 Jun 2005 23:55:55 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Debug version Ok, Release version Failed

2. Debug version Ok, Release version Failed

3. Debug version works, Release version does not?!

4. Debug version works, Release version doesn't

5. Debug version program works fine but its release version causes a GP error

6. Help: Debug-Version works, Release-Version crashes!

7. Program in debug version works but not in release version

8. Debug version works, Release version doesn't

9. Release version works differently then the debug version on VC6

10. Release version works but debug version crashes

11. debug version works, release version crushes at start up--Help

12. Debug version - Release version

 

 
Powered by phpBB® Forum Software