Object Reference Error

5 posts, 0 answers
  1. Zachary Greve
    Zachary Greve avatar
    3 posts
    Member since:
    Oct 2009

    Posted 31 May 2011 Link to this post

    Whenever I try to decompile the Microsoft.mshtml.dll file, I get the following error in the "code view" window:

    Object reference not set to an instance of an object.
       at Telerik.JustDecompiler.Languages.AttributeWriter.ƒ(CustomAttributeArgument argument)
       at Telerik.JustDecompiler.Languages.AttributeWriter.€(CustomAttribute attribute)
       at Telerik.JustDecompiler.Languages.AttributeWriter.WriteMemberAttributesAndNewLine(IMemberDefinition member)
       at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.Write(IMemberDefinition member)
       at JustDecompile.CodeViewer.ViewModels.CodeViewerViewModel.(AssemblyMemberNode member, CancellationToken cancellationToken) in c:\B\Behemoth\JustDecompile Production Build\Sources\UI\JustDecompile.CodeViewer\ViewModels\CodeViewerViewModel.cs:line 102

    NOTE: I tried it again, and it briefly came up with:
    <TypeLibType(

    Then promptly gave the above error message.

    Another thing, JustDecompile will give the error message above only for Classes and Interfaces, NOT Structures or Enums. Hope that info helps.

    EDIT: The error only occurs when the file is some kind of COM Interop Library.
  2. Tsviatko Yovtchev
    Admin
    Tsviatko Yovtchev avatar
    409 posts

    Posted 07 Jun 2011 Link to this post

    Hello Zachary,

     What member of taht asssembly are you trying to decompile? 

    I am able to successfully open Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a and browse through its members. 

    Actually we released a new version of JD on June the 3rd. What version do you have installed? Maybe the new version fixes that problem?

    Regards,
    Tsviatko Yovtchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
  4. Zachary Greve
    Zachary Greve avatar
    3 posts
    Member since:
    Oct 2009

    Posted 08 Jun 2011 Link to this post

    The problem occurs with any interface or class. I will try the new version after I get it installed. My computer sometimes does not like to run MSI installers.

    EDIT: The update did not work. It gave me the following error.

    Current member / type: mshtml.IHTMLDocument2
    File path: C:\Program Files\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Common\Microsoft.mshtml.dll
    Object reference not set to an instance of an object.
       at Telerik.JustDecompiler.Languages.AttributeWriter.ƒ(CustomAttributeArgument argument)
       at Telerik.JustDecompiler.Languages.AttributeWriter.€(CustomAttribute attribute)
       at Telerik.JustDecompiler.Languages.AttributeWriter.WriteMemberAttributesAndNewLine(IMemberDefinition member)
       at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.Write(IMemberDefinition member, Boolean showCompilerGeneratedMembers)
       at Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.Write(IMemberDefinition member)
       at JustDecompile.CodeViewer.CodeWriter.Write() in c:\B\Behemoth\JustDecompile Production Build\Sources\UI\JustDecompile.CodeViewer\Writers\CodeWriter.cs:line 32
       at JustDecompile.CodeViewer.ViewModels.CodeViewerViewModel.(AssemblyMemberNode member, CancellationToken cancellationToken) in c:\B\Behemoth\JustDecompile Production Build\Sources\UI\JustDecompile.CodeViewer\ViewModels\CodeViewerViewModel.cs:line 107

    The file version of the MSHTML assembly is 7.0.3300.1 and the product version is 7.0.3300.0. JustDecompile says the .NET version is 'Any'.

    The file area states: Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  5. Tsviatko Yovtchev
    Admin
    Tsviatko Yovtchev avatar
    409 posts

    Posted 14 Jun 2011 Link to this post

    Ah I see. I could reproduce it now. It does not happen in all classes/interfaces though. 

    What happens is that the assembly you're trying to open refers mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. You don't have this assembly and we fail to resolve it hence the exception. That's bad error handling on our side and we'll fix it. In the meantime you could install the respective version of the .Net framework and you'll be able to decompile that stuff.

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  6. Zachary Greve
    Zachary Greve avatar
    3 posts
    Member since:
    Oct 2009

    Posted 24 Jun 2011 Link to this post

    I created a workaround for the issue. I simply used ILDasm to convert the DLL into an .il file, opened the file with a text editor, changed the mscorlib version to 4:0:0:0 (the public key token was the same), and recompiled it with ILAsm. That allowed JustDecompile to read the assembly.

    -Z
Back to Top
DevCraft banner