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

Crash window when hover over record struct name #2910

Closed
PetSerAl opened this issue Feb 24, 2023 · 0 comments · Fixed by #2911
Closed

Crash window when hover over record struct name #2910

PetSerAl opened this issue Feb 24, 2023 · 0 comments · Fixed by #2911
Labels

Comments

@PetSerAl
Copy link

Steps to reproduce

record struct S();
  1. Hover over type name S

Error message shown

image

Sorry, we crashed
---------------------------
System.Exception: Invalid value for ClassType
   at ICSharpCode.Decompiler.CSharp.OutputVisitor.CSharpAmbience.ConvertSymbol(ISymbol symbol, TokenWriter writer, CSharpFormattingOptions formattingPolicy) in /_/ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs:line 87
   at ICSharpCode.ILSpy.CSharpLanguage.GetRichTextTooltip(IEntity entity)
   at ICSharpCode.ILSpy.TextView.DecompilerTextView.CreateTooltipForEntity(IEntity resolved)
   at ICSharpCode.ILSpy.TextView.DecompilerTextView.GenerateTooltip(ReferenceSegment segment)
   at ICSharpCode.ILSpy.TextView.DecompilerTextView.TextViewMouseHover(Object sender, MouseEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Threading.DispatcherTimer.FireTick()
   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)

Details

  • Product in use: ILSpy
  • Version in use: 8.0.0.7246-preview3
@PetSerAl PetSerAl added the Bug label Feb 24, 2023
ElektroKill added a commit to ElektroKill/ILSpy that referenced this issue Feb 24, 2023
dgrunwald added a commit that referenced this issue Feb 26, 2023
Add support for record structs in `CSharpAmbience` (fixes #2910)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant