Skip to content

InvalidCastException when navigating to Metadata -> Tables -> 00 Module node #3723

@0xfeeddeadbeef

Description

@0xfeeddeadbeef

Steps to reproduce

  1. Open any .NET assembly
  2. In the Assemblies tree view, expand Metadata -> Tables node
  3. Click on 01 TypeRef (x) node
  4. Click on 00 Module (x) node

Error message shown

---------------------------
Sorry, we crashed
---------------------------
System.InvalidCastException: Unable to cast object of type 'TypeRefEntry' to type 'ModuleEntry'.

   at <>z__ReadOnlySingleElementList`1.System.Collections.IList.IndexOf(Object value)

   at System.Windows.Data.ListCollectionView.InternalIndexOf(Object item)

   at System.Windows.Controls.ItemsControl.LeaseItemInfo(ItemInfo info, Boolean ensureIndex)

   at System.Windows.Controls.ItemsControl.OnBringItemIntoView(ItemInfo info)

   at System.Windows.Controls.DataGrid.ScrollIntoView(ItemInfo info)

   at DataGridExtensions.DataGridFilterHost.<>c__DisplayClass27_0.<EvaluateFilter>b__0() in D:\a\1\s\src\DataGridExtensions\DataGridFilterHost.cs:line 292

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
---------------------------
OK   
---------------------------

Screenshot:

Image

Details

  • Product in use: ILSpy
  • Version in use: 10.0.0.8330+5deb6fb4258a09ba0ff5f63fa6180b1f8d6fb6ad
  • In the screenshot, the decompiled assembly is Humanizer.Core.fil.dll - it is not relevant, I can reproduce the error with ANY other assemblies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions