Closed megla-tlanghorst closed 4 months ago
Hi @megla-tlanghorst , I get a very similar exception without using the mentioned plugin (but a different one), so I assume this could be a general R# CLT problem...
See my ticket at jetbrains: https://youtrack.jetbrains.com/issue/RSRP-496947/Exception-in-ReSharper-CLT-with-SARIF-output
I'm uncertain if this issue stems from the plugin. Therefore, I recommend waiting for a response from the JB team before taking further action.
Yes, it's a bug in R# due to a bug in SARIF SDK. https://github.com/microsoft/sarif-sdk/issues/2808
When using the ReSharper CLI (you can get that from NuGet):
dotnet jb inspectcode <file>.sln --telemetry-optout --extensions=ReSharper.Structured.Logging --format=Sarif --output=out.sarif
The plugin results in the following error:
Error
``` JetBrains Inspect Code 2023.3.3 ReSharper Structured.Logging 2023.3.2.321 Running on x64 OS in x64 architecture, .NET 8.0.1 under Microsoft Windows 10.0.22631 Warning: Starting from version 2021.2, InspectCode builds the target solution before starting the analysis to make sure it only finds relevant code issues. To explicitly accept the new behavior and suppress this warning, use the '--build' option. To match the behavior in previous versions and skip the build, use '--no-build'. Using toolset version 17.0 from "C:\Program Files\dotnet\sdk\8.0.101" Configuration: Debug, Platform: Any CPU Nullable object must have a value. --- EXCEPTION #1/1 [LoggerException] Message = "Nullable object must have a value." ExceptionPath = Root ClassName = JetBrains.Util.LoggerException HResult = COR_E_APPLICATION=80131600 StackTraceString = " at JetBrains.Util.ILoggerEx.LogMessage(ILogger this, LoggingLevel level, String message) in LogMessage.il:line IL_002E mvid 9968 at JetBrains.Util.ILoggerEx.Error(ILogger this, String message) in Error.il:line IL_0000 mvid 9968 at JetBrains.CommandLine.InspectCode.Unattended.Console.InspectCodeProductMain.Main(Lifetime lifetime, IThreading invocator, IComponentContainer container, IShellLocks shellLocks, ILogger logger, IInspectCodeSettings settings, InspectCodeCommandLineArguments argumentsRaw, IProductInfo productInfo) in Main.il:line IL_0388 mvid 83B6 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in InvokeWithManyArgs.il:line IL_0243 mvid 477B at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) in Invoke.il:line IL_0000 mvid 477B at JetBrains.Application.Components.MethodBindigns.Activate(ISingletonDescriptor descriptor, Object[] dependencies) in Activate.il:line IL_0053 mvid 9EEF at JetBrains.Application.Components.RuntimeMemberComponentDescriptor.DoCreateInstance(MethodBindigns bindings, Object[] dependencies) in DoCreateInstance.il:line IL_0000 mvid 9EEF at JetBrains.Application.Components.SingletonDescriptor`1.CreateInstance(Object[] dependencies) in CreateInstance.il:line IL_005F mvid 9EEF at JetBrains.Application.Components.AsyncDescriptorBase.ActivatingComponentState.CreateInstance() in CreateInstance.il:line IL_0033 mvid 9EEF at JetBrains.Application.Components.AsyncDescriptorBase.ActivatingComponentState.TryGetSyncImpl() in TryGetSyncImpl.il:line IL_00A8 mvid 9EEF at JetBrains.Application.Components.AsyncDescriptorBase.StateWithPriorityCache`1.TryGetSync() in TryGetSync.il:line IL_0010 mvid 9EEF at JetBrains.Application.Components.AsyncDescriptorBase.TryActivate(Object[] dependencyValues) in TryActivate.il:line IL_000B mvid 9EEF at JetBrains.Application.Components.AsyncDescriptorBase.TryGetOrCreateValue() in TryGetOrCreateValue.il:line IL_002F mvid 9EEF at JetBrains.Application.Components.AsyncDescriptorBase.GetValue() in GetValue.il:line IL_0006 mvid 9EEF at JetBrains.Application.Components.FactoryComponentContainer.InvokeLive(Lifetime lifetime, IComponentContainer parent, MemberInfo method, Object instance, Object[] args) in InvokeLive.il:line IL_008D mvid 9EEF at JetBrains.Application.Environment.RunsPublicStaticIntMain.<>c__DisplayClass0_0.<.ctor>b__0() in RunsPublicStaticIntMain.il:line IL_000B mvid 5434 or RunsPublicStaticIntMain.il:line IL_016C mvid 5434 at JetBrains.Application.Environment.RunsPublicStaticIntMain.<>c__DisplayClass0_2.<.ctor>b__5() in RunsPublicStaticIntMain.il:line IL_000B mvid 5434 or RunsPublicStaticIntMain.il:line IL_016C mvid 5434 at JetBrains.Application.Threading.IThreadingEx.<>c__DisplayClass16_0.<Sadly there doesn't seem to be any good stacktrace, since this doesn't even include plugin code (it works without the plugin though).