Hi,
we stumbled upon another threading-issue within our test suite. It seems that the editor instance is disposed on the main thread, while the parser thread tries to update the automatic outlining. In our case it is in combination with the C# language add-on, but the problem applies to all languages with automatic outlining.
It isn't easy to reproduce, but never the less the access to variables that are used in different threads should be synchronized. Additionally we are going to wait for the parser thread, before we call dispose to avoid any other unforseen problems.
Exception message: System.NullReferenceException: Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.Document.PerformAutomaticOutlining(TextRange parseTextRange, AutomaticOutliningBehavior behavior, DocumentModification modification, Boolean isProgrammaticTextReplacement)
at ActiproSoftware.SyntaxEditor.Document.#AAh(ISemanticParseData value, TextRange parseTextRange, Boolean isProgrammaticTextReplacement, Object requestSyncRoot)
at ActiproSoftware.SyntaxEditor.Document.#fAh(SemanticParserServiceRequest request)
at ActiproSoftware.SyntaxEditor.SemanticParserService.#Jth(SemanticParserServiceRequest request)
at ActiproSoftware.SyntaxEditor.SemanticParserService.#Kth()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Best regards, Tobias Lingemann.