NullReferenceException in RecordDecompiler on an assembly from Roslyn
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 67/100
Hướng nghiên cứu
Start with RecordDecompiler.cs, especially DetectPrimaryConstructor() at line 203, where the reported NullReferenceException occurs. Reproduce by opening Microsoft.CodeAnalysis.CSharp.Workspaces version 5.0.0 in ILSpy and decompiling CSharpSimplifierOptions; confirm the fix by successfully decompiling that class without the exception.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Steps to reproduce
- Start ILSpy
- Choose "Open from NuGet feed", select
Microsoft.CodeAnalysis.CSharp.Workspacespackage of version5.0.0. - Navigate to
lib/netstandard2.0/Microsoft.CodeAnalysis.CSharp.Workspaces.dll - In the
Microsoft.CodeAnalysis.CSharp.Simplificationnamespace open classCSharpSimplifierOptions
Error message shown
// Microsoft.CodeAnalysis.CSharp.Workspaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// Microsoft.CodeAnalysis.CSharp.Simplification.CSharpSimplifierOptions
/* Decompilation failed: Error decompiling @02000091 Microsoft.CodeAnalysis.CSharp.Simplification.CSharpSimplifierOptions
Error decompiling @02000091 Microsoft.CodeAnalysis.CSharp.Simplification.CSharpSimplifierOptions
in assembly "lib/netstandard2.0/Microsoft.CodeAnalysis.CSharp.Workspaces.dll"
---> System.NullReferenceException: Object reference not set to an instance of an object.
at ICSharpCode.Decompiler.CSharp.RecordDecompiler.DetectPrimaryConstructor() in RecordDecompiler.cs:line 203
at ICSharpCode.Decompiler.CSharp.RecordDecompiler..ctor(IDecompilerTypeSystem dts, ITypeDefinition recordTypeDef, DecompilerSettings settings, CancellationToken cancellationToken) in RecordDecompiler.cs:line 65
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DoDecompile(ITypeDefinition typeDef, DecompileRun decompileRun, ITypeResolveContext decompilationContext, Boolean asExtension) in CSharpDecompiler.cs:line 1864
-- continuing with outer exception (ICSharpCode.Decompiler.DecompilerException) --
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DoDecompile(ITypeDefinition typeDef, DecompileRun decompileRun, ITypeResolveContext decompilationContext, Boolean asExtension) in CSharpDecompiler.cs:line 2001
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.Decompile(IEnumerable`1 definitions) in CSharpDecompiler.cs:line 1468
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.Decompile(EntityHandle[] definitions) in CSharpDecompiler.cs:line 1440
at ICSharpCode.ILSpy.Languages.CSharpLanguage.DecompileType(ITypeDefinition type, ITextOutput output, DecompilationOptions options) in offset 29
at ICSharpCode.ILSpy.TreeNodes.TypeTreeNode.Decompile(Language language, ITextOutput output, DecompilationOptions options) in offset 0
at ICSharpCode.ILSpy.TextView.DecompilerTabPageModel.<>c__DisplayClass91_0.<DecompileAsync>b__1() in offset 161
*/
Details
- Product in use: originally ICSharpCode.Decompiler package, reproduced on ILSpy too
- Version in use: ILSpy: 11.2.0.10050+c86190ef4e24f3137c13a9275316042842d2fada, ICSharpCode.Decompiler package: 10.0.0.8323-preview3 and 11.2.0.10050
- Ngôn ngữ chính
- C#
- Star
- 26.8k
- Fork
- 3.8k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 71
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của icsharpcode/ILSpy
-
AvaloniaEdit Issues to dateĐang mởExternal UI
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
icsharpcode/ILSpy#4284 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
icsharpcode/ILSpy#4275 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
AI
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
icsharpcode/ILSpy#4300 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
icsharpcode/ILSpy#4298 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug Decompiler
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
icsharpcode/ILSpy#4280 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của icsharpcode/ILSpy
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug elsa 3 prio low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elsa-workflows/elsa-core#9154 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NethermindEth/nethermind#15452 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind:ux size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
elsa-workflows/elsa-foundation#3563 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
请让 FPS 叠加层的字号大小可单独设置Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày