Jump to content
  • Advertisement
Sign in to follow this  
laeuchli

Release DLL issue

This topic is 3097 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear All, I have a release DLL(the collada DOM lib), that I need to use in a rather large project. I have built the DLL in release mode, and used it in a simple test project, and it works, so I know on some level the DLL is 'ok'. However, when I go to the large application I've been asked to work on, and try and use the same code that worked in my sample project, I get this error message: First-chance exception at 0x13587f2f in BlahBlahBlah.exe: 0xC0000005: Access violation reading location 0x00000004. This code works with the debug version of the dll, and the acctual code works in a different project in release mode, so it must be due to the way I'm linking to the dll, but I havent got any idea what settings I should be looking at. Does anyone have any suggestions? I have tried turning of optimizations in the dll build, and enabling debugging information, but this did not result in any change. Regards, Jesse [Edited by - laeuchli on December 1, 2009 3:49:45 PM]

Share this post


Link to post
Share on other sites
Advertisement
Does the crash occur when linking the release DLL to your debug build? (In which case, link to the debug dll in your debug build, and the release.dll to your release build)

Share this post


Link to post
Share on other sites
You're dereferencing a null pointer somewhere in your code - E.g. if you pass a struct pointer to a function in the DLL, then you're passing a null pointer and you're accessing a member of that struct 4 bytes from the start of it.

Can you run a debug version of the application with a release version of the DLL? If so, you can run the app in the debugger and hopefully get some useful information from it.

You could also try turning on Generate Map File in the linker -> debugging settings for the DLL (And if you're on Vista you'll need to disable dynamic rebase in linker -> advanced -> randomized base address), and then find what function that address is in (Based on the "Rva+Base" address in the map file.

Share this post


Link to post
Share on other sites
Thanks for the help guys..it turns out that one of the compile flags that is being used in the main project was not enabled when I compiled the release dll. I dont know why I was able to run it in debug, but at least that fixed the problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!