2

While attempting to debug an application, I keep noticing that two of my arrays and one of my lists seems to be mysteriously... Not there. The error given for that (upon pausing the application and looking through my compiler's variable list) is "A class is not loaded HRESULT: 0x80131303".

After googling, I found out that that particular HRESULT is named "CORDBG_E_CLASS_NOT_LOADED", however I found nothing about it's possible cause, or how to solve it.

I would normally paste the relevant code here, but from what I can find, this error happens directly at the declaration of the effected arrays and list.

Can anyone here help?

Edward Black
  • 250
  • 2
  • 10

1 Answers1

1

You may be loading a class implicitly at startup, which causes an error because not everything is initialized yet. Make sure you are not accessing anything in an unloaded class that could cause this.

xpda
  • 15,585
  • 8
  • 51
  • 82
  • How would I be able to tell if I'm loading a class implicitly? – Edward Black Nov 19 '11 at 05:16
  • Go through and make sure no variables or objects of other classes are accessed during initialization. If, for example, you access a variable in a form class before the form is loaded, it will load that form before it is explicitly loaded. Then, when you explicitly load the form, you may have two instances of the form class, which gets confusing. – xpda Nov 19 '11 at 07:13