Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I installed a software application compiled by our developers, which was successful. However, when I launched the application, it crashed. Looking at the crash log file, I noticed the error was isolated to:

132821 [Error] [AppName]: System.TypeInitializationException: The type initializer for '[ObjectName]' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Why did this happen? The developers swear that it worked successfully on their PCs, but that's because they have a development environment and I don't.

I ran a tool called Dependency Walker, which showed several dlls that were not on my system.

Could you please advise as to how I can resolve the missing dll issue and/or the System.TypeInitializationException message?

Thanks.

V/R,
John
Posted
Comments
[no name] 9-May-14 15:59pm    
Quite frequently, Dependency Walker is less than truthful when it shows you that some DLLs are missing. It will tell you DLLs are missing if they are loaded dynamically for instance. Try each DLL one at a time and see if you get lucky. You can try Process Explorer to see which DLL your application is trying to access at the time it is running. Short of finding the DLL(s) that is missing or getting your devs to tell you what is going on at the time the application crashes, I don't know that there is a whole lot you can do. Your devs should be looking into it not you, sounds like.

1 solution

Thanks Wes for your prompt response. Incidentally, as I received your response, one of the developers managed to fix the issue within the application installer package. Apparently there was an unnecessary (and malformed) copy of an xml file included in the installer according to one of the developers. If that file had been removed, this issue would never have happened.

But I got the application working fine now. Thanks again.


V/R,
John
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900