Jump to content
  • Advertisement
Sign in to follow this  
Mace

[.net] BadImageFormatException from creating a simple class instance

This topic is 4526 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

First, take a look at this screenshot. http://silvershade-games.com/downloads/fascinating.jpg Declaration of the base class: public abstract class RenderManagerBase Declaration of the implementation of the class: public class RenderManagerDirectX9 : RenderManagerBase Two standard classes, but i get the BadImageFormatException when creating an instance of the class and i have no idea why. The system that its compiled under has a processor with 2 cores and running windows with 64bit support. However, when i compile the same thing on my machine (AMD Athlon 64 which only has one core) it compiles fine. We both have Visual Studio 2005, running XP. Any ideas? :)

Share this post


Link to post
Share on other sites
Advertisement
Which DX update are you running? According to the docs for the August 05 update, the Material class's constructor doesn't take a parameter.

Share this post


Link to post
Share on other sites
Quote:
Original post by Machaira
Which DX update are you running? According to the docs for the August 05 update, the Material class's constructor doesn't take a parameter.


I forgot to mention that the material you see there is not a DX material but a custom one used internally by the engine.

Share this post


Link to post
Share on other sites
Quote:
Original post by Machaira
Have you stepped through the code for the constructors, especially for the Material object?


Ive stepped through the code and the crash occurs before the contructor
members have a chance to get called, as highlighted in yellow on the screenshot.
Thats why im puzzled, because i have never seen a class creation crash like this.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!