Crashes with alternet editor

Hi,
we have reoccuring crashes with following callstack:

<Exception Type="System.InvalidOperationException"> <StackTrace> bei System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) bei Alternet.Syntax.CodeCompletion.NetTypes.AddType(Type type, Boolean global) bei Alternet.Syntax.CodeCompletion.ReflectionRepository.RegisterType(String name, Type type, Boolean global) bei Alternet.Syntax.Parsers.Advanced.CsParser.CreateRepository() bei Alternet.Syntax.SyntaxParser.get_CompletionRepository() bei Alternet.Syntax.Parsers.Advanced.NetSyntaxParser.ShouldOutlineCommentNode(ISyntaxNode node) bei Alternet.Syntax.Parsers.Advanced.NetSyntaxParser.FixupComments() bei Alternet.Syntax.Parsers.Advanced.NetSyntaxParser.ReparseText() bei Alternet.Syntax.SyntaxParser.ReparseText(Boolean useThread, Int32 first, Int32 last) bei Alternet.Editor.TextSource.TextSource.ReparseTextAction() bei Alternet.Editor.TextSource.TextSource.BackgroundThread.Execute(ThreadProcsEventArgs action) bei Alternet.Editor.TextSource.TextSource.BackgroundThread.Resume() bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx
These crashes cannot be handled in our application as they happen in a background thread.

The message in the Exception is:
Hashtable insert failed. Load factor too high

Can you fix this, please?

Best Regards

Karol

Hello,

This could happen if NetTypes internal hashtable is accessed from different thread. We could not reproduce the problem, however we will put additional locks around this code to make it thread-safe.

For now could you check if putting code like this somewhere in Form.OnLoad solves the problem?

var repository = csParser1.CompletionRepository;

Regards,
Dmitry