Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert at ICSharpCode.Decompiler.TypeSystem.ApplyAttributeTypeVisitor.ExpectDummyNullabilityForGenericValueType() #3313

Open
greenozon opened this issue Oct 27, 2024 · 0 comments
Labels
Bug Decompiler The decompiler engine itself

Comments

@greenozon
Copy link

Input code

save as proj

Erroneous output

Error decompiling for 'Iced.Intel.DecoderInternal\OpCodeHandlersTables_EVEX.cs'
in assembly "C:\Temp\SensorProfiler.Module.dll"
 ---> ICSharpCode.ILSpy.AssertionFailedException: 
   at ICSharpCode.ILSpy.ILSpyTraceListener.Fail(String message, String detailMessage) in offset 379
   at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage) in offset 48
   at System.Diagnostics.Debug.Fail(String message, String detailMessage) in offset 0
   at ICSharpCode.Decompiler.TypeSystem.ApplyAttributeTypeVisitor.ExpectDummyNullabilityForGenericValueType() in ApplyAttributeTypeVisitor.cs:line 240
   at ICSharpCode.Decompiler.TypeSystem.ApplyAttributeTypeVisitor.VisitParameterizedType(ParameterizedType type) in ApplyAttributeTypeVisitor.cs:line 322
   at ICSharpCode.Decompiler.TypeSystem.ParameterizedType.AcceptVisitor(TypeVisitor visitor) in ParameterizedType.cs:line 330
   at ICSharpCode.Decompiler.TypeSystem.ApplyAttributeTypeVisitor.ApplyAttributesToType(IType inputType, ICompilation compilation, Nullable`1 attributes, MetadataReader metadata, TypeSystemOptions options, Nullability nullableContext, Boolean typeChildrenOnly, Nullable`1 additionalAttributes) in ApplyAttributeTypeVisitor.cs:line 158
   at ICSharpCode.Decompiler.TypeSystem.Implementation.MetadataMethod.DecodeSignature(MetadataModule module, IParameterizedMember owner, MethodSignature`1 signature, Nullable`1 parameterHandles, Nullability nullableContext, TypeSystemOptions typeSystemOptions, Nullable`1 additionalReturnTypeAttributes) in MetadataMethod.cs:line 273
   at ICSharpCode.Decompiler.TypeSystem.Implementation.MetadataMethod.DecodeSignature() in MetadataMethod.cs:line 194
   at ICSharpCode.Decompiler.TypeSystem.Implementation.MetadataMethod.get_ReturnType() in MetadataMethod.cs:line 162
   at ICSharpCode.Decompiler.CSharp.RequiredNamespaceCollector.CollectNamespacesForMemberReference(IMember member) in RequiredNamespaceCollector.cs:line 398
   at ICSharpCode.Decompiler.CSharp.RequiredNamespaceCollector.CollectNamespacesFromMethodBody(MethodBodyBlock method, MetadataModule module) in RequiredNamespaceCollector.cs:line 346
   at ICSharpCode.Decompiler.CSharp.RequiredNamespaceCollector.CollectNamespaces(IEntity entity, MetadataModule module, CodeMappingInfo mappingInfo) in RequiredNamespaceCollector.cs:line 133
   at ICSharpCode.Decompiler.CSharp.RequiredNamespaceCollector.CollectNamespaces(IEntity entity, MetadataModule module, CodeMappingInfo mappingInfo) in RequiredNamespaceCollector.cs:line 99
   at ICSharpCode.Decompiler.CSharp.RequiredNamespaceCollector.CollectNamespaces(IEntity entity, MetadataModule module, HashSet`1 namespaces) in RequiredNamespaceCollector.cs:line 56
   at ICSharpCode.Decompiler.CSharp.RequiredNamespaceCollector.CollectNamespaces(EntityHandle entity, MetadataModule module, HashSet`1 namespaces) in RequiredNamespaceCollector.cs:line 205
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DecompileTypes(IEnumerable`1 types) in CSharpDecompiler.cs:line 952
   at ICSharpCode.Decompiler.CSharp.ProjectDecompiler.WholeProjectDecompiler.<>c__DisplayClass46_0.<WriteCodeFilesInProject>b__5(IGrouping`2 file) in WholeProjectDecompiler.cs:line 289
-- continuing with outer exception (ICSharpCode.Decompiler.DecompilerException) --
   at ICSharpCode.Decompiler.CSharp.ProjectDecompiler.WholeProjectDecompiler.<>c__DisplayClass46_0.<WriteCodeFilesInProject>b__5(IGrouping`2 file) in WholeProjectDecompiler.cs:line 313
   at System.Threading.Tasks.Parallel.<>c__DisplayClass43_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) in offset 259
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in offset 17
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source) in offset 0
   at System.Threading.Tasks.Parallel.<>c__DisplayClass43_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) in offset 609
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() in offset 35

image

Details

  • ILSpy version 9.0.0.7827-preview3+e96605ca8721c096b9540d0d155f50657c4e54fc
    .NET version 8.0.8+08338fcaa5c9b9a8190abb99222fed12aaba956c

err.zip

@greenozon greenozon added Bug Decompiler The decompiler engine itself labels Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Decompiler The decompiler engine itself
Projects
None yet
Development

No branches or pull requests

1 participant