# Crashes with alternet editor

**URL:** <https://forum.alternetsoft.com/t/crashes-with-alternet-editor/217>\
**Category:** AlterNET Studio Support\
**Tags:** editor\
**Created:** [March 11, 2021, 2:07pm UTC](https://forum.alternetsoft.com/t/crashes-with-alternet-editor/217 "2021-03-11T14:07:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ks1](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/k/606060/32.png) [@ks1](https://forum.alternetsoft.com/u/ks1)\
**Post date:** [March 11, 2021, 2:07pm UTC](https://forum.alternetsoft.com/t/crashes-with-alternet-editor/217/1 "2021-03-11T14:07:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dmitry.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/dmitry.medvedev/32/27_2.png) [@dmitry.medvedev](https://forum.alternetsoft.com/u/dmitry.medvedev)\
**Post date:** [March 11, 2021, 2:08pm UTC](https://forum.alternetsoft.com/t/crashes-with-alternet-editor/217/2 "2021-03-11T14:08:16Z")

</div>

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
