zzarchive-VisualFSharpPowerTools icon indicating copy to clipboard operation
zzarchive-VisualFSharpPowerTools copied to clipboard

Exception in VFT's `LanguageService.VsTextColorState.GetColorStateAtStartOfLine`

Open vasily-kirichenko opened this issue 9 years ago • 2 comments
trafficstars

VS 2015, just after opening VFPT solution:

[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
[VFPT][Error 04:41:37 PM] Context: Exception occurs while querying lexing states.
Exception Message: Object reference not set to an instance of an object.
Stack Trace:    at Microsoft.VisualStudio.FSharp.LanguageService.VsTextColorState.GetColorStateAtStartOfLine(IVsTextColorState colorState, Int32 line)
   at lambda_method(Closure , IVsTextColorState , Int32 )
   at FSharpVSPowerTools.ProjectSystem.VSLanguageService.buildQueryLexState(ITextBuffer textBuffer, String source, FSharpList`1 defines, Int32 line)
.............

Number of exception is huge, the output window contained > 7000 lines.

vasily-kirichenko avatar Nov 21 '15 13:11 vasily-kirichenko

Looks like threading issue.

vasily-kirichenko avatar Nov 21 '15 13:11 vasily-kirichenko

We haven't had this issue when Tokenize functions are called on UI thread. Do you know when this issue occurs? If it's a threading issue, it may happen quite frequently.

dungpa avatar Nov 25 '15 23:11 dungpa