Bug in assembly resource decompilation

Hi,
I upgraded Net Reflector to version 11.1 from version 10.3.
When I try to open an localized assmbly resource like System.Web.Mvc.resources.dll clicking on assemIy node I obtain the following error:

Translation failure in 'System.Web.Mvc.resources, Version=5.2.7.0, Culture=de, PublicKeyToken=31bf3856ad364e35' in 'System.Web.Mvc.resources, Version=5.2.7.0, Culture=de, PublicKeyToken=31bf3856ad364e35'.
System.Reflection.TargetInvocationException


Caused by:

Unable to get assembly reference for type of code identifier.
System.NotSupportedException
  in Reflector.ObjectModelResolutionHelper.GetAssemblyReference(ITypeReference value)
  in Reflector.CodeIdentifier.SetTypeDeclaration(IType type)
  in Reflector.CodeIdentifier..ctor(Object value)
  in Reflector.Application.UserInterface.HtmlFormatterViewer.GenerateLinkUrl(Object value)
  in Reflector.Application.UserInterface.HtmlFormatterViewer.WriteReference(String text, String toolTip, Object target)
  in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteCustomAttribute(ICustomAttribute customAttribute, IFormatter formatter)
  in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteCustomAttributeList(ICustomAttributeProvider value, IFormatter formatter, String target, HashSet`1 hide)
  in Reflector.Application.Languages.CSharpLanguage.LanguageWriter.WriteAssembly(IAssembly value)
  in Reflector.Application.UserInterface.DisassemblerWindow.Render(Boolean expandTypes, Boolean expandMethods)

Conversely using the older version 10.3 the assembly is loaded correctly.

Thanks
Filippo
Tagged:

Answers

  • Pete2019Pete2019 Posts: 1 New member
    Confirmed, the latest 11.1.0.2167 has serious bug, basically cannot decompile anything with generic implemented. After update to latest Visual Studio 2022 service pack, the reflector 11.1.0.2167 produces the errors with pretty much all dll files, this application not usable anymore. Please use Jetbrains dotPeek instead. Here is an example:

    System.Reflection.TargetInvocationException


    Caused by:

    Malformed function pointer signature.
    System.NotSupportedException
      at Reflector.CodeModel.Assembly.Module.ReadFunctionPointer(ByteArrayReader reader, IGenericArgumentProvider genericType, IGenericArgumentProvider genericMethod)
      at Reflector.CodeModel.Assembly.Module.ReadTypeSignature(ByteArrayReader reader, IGenericArgumentProvider genericType, IGenericArgumentProvider genericMethod, Boolean& pinned)
      at Reflector.CodeModel.Assembly.Module.ReadTypeSignature(ByteArrayReader reader, IGenericArgumentProvider genericType, IGenericArgumentProvider genericMethod)
      at Reflector.CodeModel.Assembly.FieldDeclaration..ctor(TypeDeclaration declaringType, UInt16 flags, Int32 name, Int32 signature)
      at Reflector.CodeModel.Assembly.Module.DecodeTypeDeclarationTable()
      at Reflector.CodeModel.Assembly.Module.DecodeMetaData()
      at Reflector.CodeModel.Assembly.Module.get_Types()
      at Reflector.CodeModel.Assembly.Equality.ResolveTypeReference(ITypeReference typeReference, HashSet`1 alreadyChecked)
      at Reflector.CodeModel.Assembly.TypeReference.Resolve(HashSet`1 alreadyChecked)
      at Reflector.CodeModel.Assembly.Equality.ResolveTypeReference(ITypeReference typeReference, HashSet`1 alreadyChecked)
      at Reflector.CodeModel.Assembly.TypeReference.Resolve(HashSet`1 alreadyChecked)
      at Reflector.CodeModel.Assembly.CustomAttribute.GetUnderlyingFieldType(IType value)
      at Reflector.CodeModel.Assembly.CustomAttribute.ReadValue(ByteArrayReader reader, IType type)
      at Reflector.CodeModel.Assembly.CustomAttribute.get_Arguments()
      at Reflector.CodeModel.Visitor.Cloner.TransformCustomAttribute(ICustomAttribute value)
      at Reflector.CodeModel.Visitor.Transformer.TransformCustomAttributeCollection(ICustomAttributeCollection attributes)
      at Reflector.CodeModel.Visitor.Cloner.TransformTypeDeclaration(ITypeDeclaration value)
      at Reflector.CodeModel.Visitor.Transformer.TransformTypeDeclarationCollection(ITypeDeclarationCollection value)
      at Reflector.CodeModel.Visitor.Cloner.TransformTypeDeclaration(ITypeDeclaration value)
      at Reflector.Disassembler.Disassembler.TransformTypeDeclaration(ITypeDeclaration value)
      at Reflector.CodeModel.Visitor.Transformer.TransformTypeDeclarationCollection(ITypeDeclarationCollection value)
      at Reflector.Disassembler.Disassembler.TransformNamespace(INamespace value)
      at Reflector.Application.Translator.TranslateNamespace(INamespace value, Boolean memberDeclarationList)
      at Reflector.Application.UserInterface.DisassemblerWindow.Render(Boolean expandTypes, Boolean expandMethods)
  • pshrosbreepshrosbree Posts: 2 New member
    Has there been any progress on resolving this bug? I am using Version 11.1.0.2167 vspro in standalone mode.
  • brock01brock01 Posts: 1 New member
    Pete2019 said:
    Confirmed, the latest 11.1.0.2167 has serious bug, basically cannot decompile anything with generic implemented. After update to latest Visual Studio 2022 service pack, the reflector 11.1.0.2167 produces the errors with pretty much all dll files, this application not usable anymore. Please use Jetbrains dotPeek instead. Here is an example:

    System.Reflection.TargetInvocationException


    Caused by:

    Malformed function pointer signature.
    System.NotSupportedException
      at Reflector.CodeModel.Assembly.Module.ReadFunctionPointer(ByteArrayReader reader, IGenericArgumentProvider genericType, IGenericArgumentProvider genericMethod)
      at Reflector.CodeModel.Assembly.Module.ReadTypeSignature(ByteArrayReader reader, IGenericArgumentProvider genericType, IGenericArgumentProvider genericMethod, Boolean& pinned) pro apk
      at Reflector.CodeModel.Assembly.Module.ReadTypeSignature(ByteArrayReader reader, IGenericArgumentProvider genericType, IGenericArgumentProvider genericMethod)
      at Reflector.CodeModel.Assembly.FieldDeclaration..ctor(TypeDeclaration declaringType, UInt16 flags, Int32 name, Int32 signature)
      at Reflector.CodeModel.Assembly.Module.DecodeTypeDeclarationTable()
      at Reflector.CodeModel.Assembly.Module.DecodeMetaData()
      at Reflector.CodeModel.Assembly.Module.get_Types()
      at Reflector.CodeModel.Assembly.Equality.ResolveTypeReference(ITypeReference typeReference, HashSet`1 alreadyChecked)
      at Reflector.CodeModel.Assembly.TypeReference.Resolve(HashSet`1 alreadyChecked)
      at Reflector.CodeModel.Assembly.Equality.ResolveTypeReference(ITypeReference typeReference, HashSet`1 alreadyChecked)
      at Reflector.CodeModel.Assembly.TypeReference.Resolve(HashSet`1 alreadyChecked)
      at Reflector.CodeModel.Assembly.CustomAttribute.GetUnderlyingFieldType(IType value)
      at Reflector.CodeModel.Assembly.CustomAttribute.ReadValue(ByteArrayReader reader, IType type)
      at Reflector.CodeModel.Assembly.CustomAttribute.get_Arguments()
      at Reflector.CodeModel.Visitor.Cloner.TransformCustomAttribute(ICustomAttribute value)
      at Reflector.CodeModel.Visitor.Transformer.TransformCustomAttributeCollection(ICustomAttributeCollection attributes)
      at Reflector.CodeModel.Visitor.Cloner.TransformTypeDeclaration(ITypeDeclaration value)
      at Reflector.CodeModel.Visitor.Transformer.TransformTypeDeclarationCollection(ITypeDeclarationCollection value)
      at Reflector.CodeModel.Visitor.Cloner.TransformTypeDeclaration(ITypeDeclaration value)
      at Reflector.Disassembler.Disassembler.TransformTypeDeclaration(ITypeDeclaration value)
      at Reflector.CodeModel.Visitor.Transformer.TransformTypeDeclarationCollection(ITypeDeclarationCollection value)
      at Reflector.Disassembler.Disassembler.TransformNamespace(INamespace value)
      at Reflector.Application.Translator.TranslateNamespace(INamespace value, Boolean memberDeclarationList)
      at Reflector.Application.UserInterface.DisassemblerWindow.Render(Boolean expandTypes, Boolean expandMethods)

    It seems like version 11.1.0.2167 of Reflector has a critical bug that prevents decompiling assemblies with generics. The issue results in errors, including System.NotSupportedException: Malformed function pointer signature. After updating to the latest Visual Studio 2022 service pack, this version becomes unusable for most DLLs.

    For now, I recommend switching to JetBrains dotPeek, which is more reliable. Here's an example of the error encountered with Reflector:

    plaintextCopy codeSystem.Reflection.TargetInvocationException: Malformed function pointer signature.
    System.NotSupportedException ...
    

    dotPeek should provide a better decompiling experience until Reflector gets patched.

Sign In or Register to comment.