CssTools icon indicating copy to clipboard operation
CssTools copied to clipboard

Object reference not set to an instance of an object

Open mojtabakaviani opened this issue 6 years ago • 4 comments

at CssTools.VendorClassifier.UpdateDeclarationCache(ParseItem item) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 109 at CssTools.VendorClassifier..ctor(IClassificationTypeRegistryService registry, ITextBuffer buffer) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 59 at CssTools.VendorClassifierProvider.<>c__DisplayClass4_0.<GetClassifier>b__0() in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 37 at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func1 creator)&#x000D;&#x000A; at CssTools.VendorClassifierProvider.GetClassifier(ITextBuffer textBuffer) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 37&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTaggerProvider.&lt;&gt;c__DisplayClass12_01.<CreateTagger>b__0(IClassifierProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeEligibleFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable1 lazyFactories, Func2 getter, IContentType dataContentType, IContentTypeRegistryService contentTypeRegistryService, Object errorSource) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

and

at CssTools.CssExtensions.GetDeclarations(RuleBlock rule) in C:\projects\csstools\src\ExtensionMethods\CssExtensions.cs:line 45 at CssTools.VendorClassifier.UpdateDeclarationCache(ParseItem item) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 116 at CssTools.VendorClassifier..ctor(IClassificationTypeRegistryService registry, ITextBuffer buffer) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 59 at CssTools.VendorClassifierProvider.<>c__DisplayClass4_0.<GetClassifier>b__0() in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 37 at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func1 creator)&#x000D;&#x000A; at CssTools.VendorClassifierProvider.GetClassifier(ITextBuffer textBuffer) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 37&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTaggerProvider.&lt;&gt;c__DisplayClass12_01.<CreateTagger>b__0(IClassifierProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeEligibleFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable1 lazyFactories, Func2 getter, IContentType dataContentType, IContentTypeRegistryService contentTypeRegistryService, Object errorSource) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Visual Studio 2017 15.8 Preview 2

mojtabakaviani avatar Jun 04 '18 09:06 mojtabakaviani

Same here on 15.8 Preview 3. It happens the first time I open a .cshtml file.

vaindil avatar Jun 28 '18 13:06 vaindil

I have had it on opening a .aspx file in source mode on 15.8 preview 3 and now preview 4

System.NullReferenceException: Object reference not set to an instance of an object. at CssTools.CssExtensions.GetDeclarations(RuleBlock rule) in C:\projects\csstools\src\ExtensionMethods\CssExtensions.cs:line 45 at CssTools.VendorClassifier.UpdateDeclarationCache(ParseItem item) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 116 at CssTools.VendorClassifier..ctor(IClassificationTypeRegistryService registry, ITextBuffer buffer) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 59 at CssTools.VendorClassifierProvider.<>c__DisplayClass4_0.<GetClassifier>b__0() in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 37 at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func1 creator) at CssTools.VendorClassifierProvider.GetClassifier(ITextBuffer textBuffer) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 37 at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTaggerProvider.<>c__DisplayClass12_01.<CreateTagger>b__0(IClassifierProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeEligibleFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable1 lazyFactories, Func2 getter, IContentType dataContentType, IContentTypeRegistryService contentTypeRegistryService, Object errorSource

AccessIT avatar Jul 18 '18 02:07 AccessIT

Following exception occurred opening project in Visual Studio community 2017 version 15.8.0

System.NullReferenceException: Object reference not set to an instance of an object. at CssTools.CssExtensions.GetDeclarations(RuleBlock rule) in C:\projects\csstools\src\ExtensionMethods\CssExtensions.cs:line 45 at CssTools.VendorClassifier.UpdateDeclarationCache(ParseItem item) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 116 at CssTools.VendorClassifier..ctor(IClassificationTypeRegistryService registry, ITextBuffer buffer) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 59 at CssTools.VendorClassifierProvider.<>c__DisplayClass4_0.<GetClassifier>b__0() in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 37 at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func1 creator)&#x000D;&#x000A; at CssTools.VendorClassifierProvider.GetClassifier(ITextBuffer textBuffer) in C:\projects\csstools\src\Classify\VendorClassifier.cs:line 37&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTaggerProvider.&lt;&gt;c__DisplayClass12_01.<CreateTagger>b__0(IClassifierProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeEligibleFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable1 lazyFactories, Func2 getter, IContentType dataContentType, IContentTypeRegistryService contentTypeRegistryService, Object errorSource)

tushroy avatar Aug 16 '18 07:08 tushroy

Following exception occurred opening project in Visual Studio community 2017 version 15.8.0

@tushroy After re-install the plugin and restart visual studio everything seems fine. No more this error on VS Pro 2017 v15.8.0

Kozhuharov avatar Aug 17 '18 06:08 Kozhuharov