dotnet / roslyn-analyzers

MIT License
1.6k stars 468 forks source link

NullReferenceException after update to 2.9.5 #2901

Closed ChristianPerner closed 5 years ago

ChristianPerner commented 5 years ago

Analyzer package

Microsoft.CodeAnalysis.FxCopAnalyzers

Package Version

v2.9.5 (Latest)

Diagnostic ID

N/A

Repro steps

  1. previously installed 2.9.3 and also tested 2.9.4
  2. update nuget in VS2019 with no erros
  3. build project

Expected behavior

No exception

Actual behavior

Slightly modified excerpt from build log:

1>  C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /nowarn:CS1591,1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /doc:bin\Release\Project.XML /define:TRACE /errorendlocation /preferreduilang:en-US /highentropyva- /reference:C:\Users\user\.nuget\packages\jetbrains.annotations\2019.1.3\lib\net20\JetBrains.Annotations.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:C:\Users\user\.nuget\packages\pt.math\1.0.19041\lib\net40\PT.Math.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\Project.dll /ruleset:..\rulesets\legacy\BasicCorrectnessRules.ruleset /target:library /utf8output /langversion:7.3 /features:flow-analysis /features:flow-analysis /features:flow-analysis /features:flow-analysis /features:flow-analysis /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\Microsoft.CodeAnalysis.VersionCheckAnalyzer.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\cs\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\de\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\es\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\fr\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\it\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\ja\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\ko\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\pl\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\pt-BR\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\ru\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\tr\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\zh-Hans\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codeanalysis.versioncheckanalyzer\2.9.5\analyzers\dotnet\zh-Hant\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\Humanizer.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\Microsoft.CodeQuality.Analyzers.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\Microsoft.CodeQuality.CSharp.Analyzers.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\cs\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\de\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\es\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\fr\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\it\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\ja\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\ko\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\pl\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\pt-BR\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\ru\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\tr\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\zh-Hans\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.codequality.analyzers\2.9.5\analyzers\dotnet\cs\zh-Hant\Microsoft.CodeQuality.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\Microsoft.NetCore.Analyzers.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\Microsoft.NetCore.CSharp.Analyzers.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\cs\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\de\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\es\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\fr\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\it\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\ja\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\ko\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\pl\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\pt-BR\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\ru\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\tr\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\zh-Hans\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netcore.analyzers\2.9.5\analyzers\dotnet\cs\zh-Hant\Microsoft.NetCore.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\Microsoft.NetFramework.Analyzers.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\Microsoft.NetFramework.CSharp.Analyzers.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\cs\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\de\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\es\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\fr\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\it\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\ja\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\ko\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\pl\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\pt-BR\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\ru\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\tr\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\zh-Hans\Microsoft.NetFramework.Analyzers.resources.dll /analyzer:C:\Users\user\.nuget\packages\microsoft.netframework.analyzers\2.9.5\analyzers\dotnet\cs\zh-Hant\Microsoft.NetFramework.Analyzers.resources.dll Alt.cs AltUeberh.cs Ausgerundet.cs AusgerundetUeberh.cs GeometryMergeErrors.cs Knickpunkt.cs TrackSpeedList.cs TrackData.cs GlobalSuppressions.cs MaschinenDaten.cs Bloss.cs Bogen.cs ReferenceRailCorrection.cs Serialization\FileWriterBase.cs Serialization\FileReaderBase.cs Serialization\KmsOperations\KmsConverterGeometry.cs Serialization\LandXML\LandXMLCantStation.cs Serialization\LandXML\LandXMLCoordGeomCurve.cs Serialization\LandXML\LandXMLCoordGeomLine.cs Serialization\LandXML\LandXMLCoordGeomSpiral.cs Serialization\LandXML\LandXMLProfAlignCircCurve.cs Serialization\LandXML\LandXMLProfAlignPVI.cs Serialization\LandXML\LandXMLGeneralTypes.cs Serialization\LandXML\LandXMLFileLoad.cs Serialization\LandXML\LandXMLObject.cs Serialization\LandXML\LandXMLLinearType.cs Serialization\LandXML\LandXMLValidationError.cs TrackSpeed.cs Vector.cs WorkingRange.cs ConstantRange.cs CompensationRange.cs CorrValForLevCalculation.cs Cos.cs CurveLaserModelList.cs CurveLaserModel.cs CurveLaserSectionModelExt.cs CurveLaserSectionModel.cs EmsatArchive.cs FixedPT.cs FixedPTs.cs GeomAnalyzer.cs Gerade.cs ILinVersineCalcData.cs ISuperelevationCalcData.cs IXCurveLaserMeasData.cs MessPfhObjArr.cs OEBBStreckenInfos.cs PolyPoints.cs Serialization\DPRMessData.cs Ausgleich.cs Serialization\OebbInfoReader.cs Serialization\XmlEnumConverter.cs Serialization\XmlReaderExtensions.cs XCorrection.cs XCorrectionData.cs XCurveLaserMeasDataExt.cs XCurveLaserMeasData.cs XGeometry.cs XGeometryData.cs XConstraintLayerList.cs XGeometryHeader.cs XMarkerList.cs XMeasurement.cs XPoint.cs ZwangsObj.cs MessDataArray.cs MessObj.cs LhPfhObjArr.cs Lindberg.cs Linear.cs MarkerArray.cs MarkerObj.cs Measurement.cs NeigN.cs NeigR.cs NeigWechsel.cs PosComparer.cs Ruch.cs Section.cs Serialization\DosFileReaderKorr.cs Serialization\DosFileReaderSync.cs Serialization\EmsatArchivReader.cs Serialization\EmsatArchivWriter.cs Serialization\FixedPointFileReader.cs Serialization\IEmsatArchivHost.cs Serialization\IFixedPointsHost.cs Serialization\IMarkerHost.cs Serialization\DosFileReaderGeom.cs Serialization\MarkerFileReader.cs Serialization\MarkerFileWriter.cs SForm.cs Sin.cs StartNeigung.cs SyncManager.cs Uebergang.cs VierPktPfhObj.cs MaschPar.cs PfhObj.cs PfhObjArray.cs Filters\EnumerableExtensions.cs IGeomType.cs IGeomTypeVisitor.cs Neigung.cs OrtsbildObj.cs OrtsbildObjArray.cs RiPfhObjArr.cs Serialization\DataExporter.cs Serialization\LegacyTextReader.cs Serialization\LegacyTextWriter.cs Serialization\PositionableStreamReader.cs PosObjArray.cs PosObj.cs Const.cs Exception.cs GeomDataArrays.cs GeomDataArray.cs GeomBaseObj.cs IHasdValues.cs IPosObjWIthSyncPos.cs KorrDataArray.cs KorrObj.cs LaengshGeomDataArray.cs Direction.cs PolyObjArray.cs PolyObj.cs Properties\AssemblyInfo.cs RichtGeomDataArray.cs UeberhGeomDataArray.cs Wien.cs WienUeberh.cs "C:\Users\user\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs" obj\Release\AssemblyInfo_Project_qzuff4lj.tys.g.cs obj\Release\GitVersionInformation_Project_01mgsv55.t1m.g.cs
1>  Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Roslyn
1>  Microsoft (R) Visual C# Compiler version 3.3.1-beta3-19461-02 (2fd12c21)
1>  Copyright (C) Microsoft Corporation. All rights reserved.
1>CSC : warning AD0001: Analyzer 'Microsoft.CodeQuality.Analyzers.QualityGuidelines.AssigningSymbolAndItsMemberInSameStatement' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
1>CSC : warning AD0001: Analyzer 'Microsoft.CodeQuality.Analyzers.QualityGuidelines.AssigningSymbolAndItsMemberInSameStatement' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
1>CSC : warning AD0001: Analyzer 'Microsoft.CodeQuality.Analyzers.QualityGuidelines.AssigningSymbolAndItsMemberInSameStatement' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
1>CSC : warning AD0001: Analyzer 'Microsoft.CodeQuality.Analyzers.QualityGuidelines.AssigningSymbolAndItsMemberInSameStatement' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
1>Done executing task "Csc".
mavasani commented 5 years ago

Duplicate of https://github.com/dotnet/roslyn-analyzers/issues/2889

ChristianPerner commented 5 years ago

Sorry, didn't checked the closed issues.