Sign in to follow this  
Tispe

Release build problem

Recommended Posts

Ok, so my DX9 app was built in release mode with debug info turned off.

I copy the release EXE to my laptop and try to run it. Error saying 3d3dx9_42.dll was not on the system. I then copy the .dll into the directory. The application window starts but no image is rendered, the window becomes immediatly unresponsive and a Just-In-Time debugger says "an unhandled win32 exception occured in EXE [2828]".

What are the steps to make a working release EXE? What additional files needs to be in the same directory as the EXE?

everything I need to know about making a release is appreciated.

Thanks

Share this post


Link to post
Share on other sites
Quote:

I then copy the .dll into the directory.

This probably wasn't the correct step. You should get the DirectX redistributable that came with the SDK version you have. Run that installer on the other computer.

Quote:

What additional files needs to be in the same directory as the EXE?

You need your exe, and any data files your program is looking for. As far as .dlls and other such stuff, you should only need to include .dlls for libraries that require you to distribute the dll. For everything else, you should run the redistributable installer for that library on the other machine. So, something like SDL or FMod would require the .dll with your app. Something like DirectX or .NET has an installer for the dlls.

Quote:

What are the steps to make a working release EXE?

First, make sure the app works in debug in your IDE. Then try to get it working in release from in the ide. Then try to get it working on another computer. At each stage you will encounter bugs that require new ways of thinking about debugging. Debug mode is wonderful because you have a fully working debugger, and LOTS of safey checks.

Release mode gets tricky. Double check that you are checking all the return values of any DirectX calls. Add a logger, and add settings so that you can log everything to help narrow down what went wrong. Set your linker settings to output a .map file, those crash dialogs give you data you can use to debug. Or, better yet use a crash report tool like Breakpad or crashrpt. Then, when your app crashes, you can load up the report in your debugger, and quickly see what happened.

Share this post


Link to post
Share on other sites
I copied the Redist and installed on my laptop. However I still get error. The Just-in-Time debugger pops up with an "unhandled exception".

"Unhandled exception at 0x004015b8 in test.exe: 0xC0000005: Access violation reading location 0x00000000."


what can this mean?

Share this post


Link to post
Share on other sites
small update.

I ran the application fine on a desktop with no Visual Studio installed. I have had some troubles before with other applications like MATLAB creating the errors resulting in the "just-in-time" debugger.

Any ideas why Visual Studio breaks applications that otherwise run on "clean" systems?

Share this post


Link to post
Share on other sites
"Unhandled exception at 0x004015b8 in test.exe: 0xC0000005: Access violation reading location 0x00000000." means you dereferenced a null pointer, usually because a D3D call fails and you didn't notice it.

Are you checking the return value of all your important functions like CreateDevice(), using the SUCCEEDED or FAILED macro? If not, that's almost certainly the problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this