I seem to be getting the following exception when calling project.SourceFiles.QueueCode immediately after creating a lang/project. It appears to be a timing issue as this usually does not occur if I break into the debugger right before the QueueCode line is hit.
Perhaps I need to be delaying the QueueCode call? Any tips appreciated.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
at a1.a(INamespaceDefinition A_0)
at bi.a(String A_0, Boolean A_1)
at bi.b(ITypeDefinition A_0)
at bi.b(ISourceFile A_0)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.ProjectAssembly.b(Object A_0, CollectionChangeEventArgs`1 A_1)
at ActiproSoftware.Text.Utility.SimpleObservableCollection`1.OnItemAdded(Int32 index, T value)
at an.OnItemAdded(Int32 index, ISourceFile value)
at ActiproSoftware.Text.Utility.SimpleObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at an.Add(String sourceFileKey, CompilationUnit compilationUnit)
at an.a(IParseRequest A_0, IParseData A_1)
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
at a1.a(INamespaceDefinition A_0)
at bi.a(String A_0, Boolean A_1)
at bi.b(ITypeDefinition A_0)
at bi.b(ISourceFile A_0)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.ProjectAssembly.b(Object A_0, CollectionChangeEventArgs`1 A_1)
at ActiproSoftware.Text.Utility.SimpleObservableCollection`1.OnItemAdded(Int32 index, T value)
at an.OnItemAdded(Int32 index, ISourceFile value)
at ActiproSoftware.Text.Utility.SimpleObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at an.Add(String sourceFileKey, CompilationUnit compilationUnit)
at an.a(IParseRequest A_0, IParseData A_1)
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.a.a(IParseRequest A_0)
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.a.a()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.a.a(IParseRequest A_0)
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.a.a()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Perhaps I need to be delaying the QueueCode call? Any tips appreciated.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
at a1.a(INamespaceDefinition A_0)
at bi.a(String A_0, Boolean A_1)
at bi.b(ITypeDefinition A_0)
at bi.b(ISourceFile A_0)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.ProjectAssembly.b(Object A_0, CollectionChangeEventArgs`1 A_1)
at ActiproSoftware.Text.Utility.SimpleObservableCollection`1.OnItemAdded(Int32 index, T value)
at an.OnItemAdded(Int32 index, ISourceFile value)
at ActiproSoftware.Text.Utility.SimpleObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at an.Add(String sourceFileKey, CompilationUnit compilationUnit)
at an.a(IParseRequest A_0, IParseData A_1)
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
at a1.a(INamespaceDefinition A_0)
at bi.a(String A_0, Boolean A_1)
at bi.b(ITypeDefinition A_0)
at bi.b(ISourceFile A_0)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.ProjectAssembly.b(Object A_0, CollectionChangeEventArgs`1 A_1)
at ActiproSoftware.Text.Utility.SimpleObservableCollection`1.OnItemAdded(Int32 index, T value)
at an.OnItemAdded(Int32 index, ISourceFile value)
at ActiproSoftware.Text.Utility.SimpleObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at an.Add(String sourceFileKey, CompilationUnit compilationUnit)
at an.a(IParseRequest A_0, IParseData A_1)
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.a.a(IParseRequest A_0)
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.a.a()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.a.a(IParseRequest A_0)
at ActiproSoftware.Text.Parsing.Implementation.ThreadedParseRequestDispatcher.a.a()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()