You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified that I am running the latest version of DisposableFixer: 3.2.0
I have searched open and closed issues to ensure it has not already been reported
Description
When hitting Ctrl+. on user.Select(u => u.FirstName) the crash occures. Btw FirstName is already disposed and SetValidateNotifyError is an extension method that pipes the given given extended argument.
Source Code
publicMainWindowViewModel(IObservable<UserDto> user){Func<string,IEnumerable>noneEmptyString= value =>string.IsNullOrWhiteSpace(value)?"Please provide a value":null;DateOfDeath=user.Select(u =>u.DateOfDeath).ToPropertyViewModel();varisReadOnly=DateOfDeath.Where(dt =>dt.HasValue).Select(dt =>dt.HasValue).DistinctUntilChanged().Publish().RefCount();Name=user.Select(u =>u.Name).ToPropertyViewModel(isReadOnly).SetValidateNotifyError(noneEmptyString);FirstName=user.Select(u =>u.FirstName).ToPropertyViewModel(isReadOnly).SetValidateNotifyError(noneEmptyString);DateOfBirth=user.Select(u =>u.DateOfBirth).ToPropertyViewModel(Observable.Return(true));ResetCommand=ObservableExt.AnyOfLatest(Name.ObserveHasChanges,FirstName.ObserveHasChanges,DateOfBirth.ObserveHasChanges,DateOfDeath.ObserveHasChanges).ToReactiveCommand();Name.ResetOn(ResetCommand.ToUnit());}
Stacktrace
System.ArgumentNullException: Value cannot be null.
Parameter name: syntax
at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.CheckSyntaxNode(CSharpSyntaxNodesyntax)
at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetTypeInfo(ExpressionSyntaxexpression,CancellationTokencancellationToken)
at Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetTypeInfo(SemanticModelsemanticModel,ExpressionSyntaxexpression,CancellationTokencancellationToken)
at async DisposableFixer.CodeFix.UndisposedMemberCodeFixProvider.CreateDisposeCallInParameterlessDisposeMethod(<Unknown Parameters>)
at asyncMicrosoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync(<Unknown Parameters>)
at asyncMicrosoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync(<Unknown Parameters>)
at asyncMicrosoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<Unknown Parameters>)
at asyncMicrosoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<Unknown Parameters>)
at asyncMicrosoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.<>c__DisplayClass11_0.<GetPreviewAsync>b__0(<Unknown Parameters>)
at asyncMicrosoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
Screenshot
The text was updated successfully, but these errors were encountered:
Prerequisites
Description
When hitting Ctrl+. on
user.Select(u => u.FirstName)
the crash occures. Btw FirstName is already disposed and SetValidateNotifyError is an extension method that pipes the given given extended argument.Source Code
Stacktrace
Screenshot
The text was updated successfully, but these errors were encountered: