blakepell / AvalonMudClient

A Windows MUD client written in C#/WPF for .NET 8.
Other
31 stars 7 forks source link

Crash Bug in FullyObservableCollection #47

Open blakepell opened 2 years ago

blakepell commented 2 years ago
Unhandled exception (TaskScheduler.UnobservedTaskException)
Unhandled exception in Avalon v2022.4.22.1
A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index'))

Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Avalon.Common.Utilities.FullyObservableCollection`1.get_Item(Int32 index) in \Git\AvalonMudClient\src\Avalon.Common\Utilities\FullyObservableCollection.cs:line 65
   at Avalon.Common.Utilities.TriggerObservableCollection.Enumerable()+MoveNext() in \Git\AvalonMudClient\src\Avalon.Common\Utilities\TriggerObservableCollection.cs:line 41
   at Avalon.Conveyor.DisableGroup(String groupName) in \Git\AvalonMudClient\src\Avalon.Client\Conveyor.cs:line 740
   at lambda_method207(Closure , Object , Object[] )
   at MoonSharp.Interpreter.Interop.MethodMemberDescriptor.Execute(Script script, Object obj, ScriptExecutionContext context, CallbackArguments args) in \Git\AvalonMudClient\src\Avalon.MoonSharp\Interop\StandardDescriptors\ReflectionMemberDescriptors\MethodMemberDescriptor.cs:line 346
   at MoonSharp.Interpreter.Interop.OverloadedMethodMemberDescriptor.<>c__DisplayClass37_0.<GetCallback>b__0(ScriptExecutionContext context, CallbackArguments args) in \Git\AvalonMudClient\src\Avalon.MoonSharp\Interop\StandardDescriptors\ReflectionMemberDescriptors\OverloadedMethodMemberDescriptor.cs:line 511
   at MoonSharp.Interpreter.Execution.VM.Processor.Internal_ExecCall(ExecutionControlToken ecToken, Int32 argsCount, Int32 instructionPtr, CallbackFunction handler, CallbackFunction continuation, Boolean thisCall, String debugText, DynValue unwindHandler) in \Git\AvalonMudClient\src\Avalon.MoonSharp\Execution\VM\Processor\Processor_InstructionLoop.cs:line 857
   at MoonSharp.Interpreter.Execution.VM.Processor.Processing_Loop(ExecutionControlToken ecToken, Int32 instructionPtr) in \Git\AvalonMudClient\src\Avalon.MoonSharp\Execution\VM\Processor\Processor_InstructionLoop.cs:line 166
   at MoonSharp.Interpreter.Execution.VM.Processor.Call(ExecutionControlToken ecToken, DynValue function, DynValue[] args) in \Git\AvalonMudClient\src\Avalon.MoonSharp\Execution\VM\Processor\Processor.cs:line 71
   at MoonSharp.Interpreter.Script.Internal_Call(ExecutionControlToken ecToken, DynValue function, DynValue[] args) in \Git\AvalonMudClient\src\Avalon.MoonSharp\Script.cs:line 407
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Avalon.Common.Scripting.MoonSharpEngine.ExecuteFunctionAsync[T](String functionName, String[] args) in \Git\AvalonMudClient\src\Avalon.Common\Scripting\MoonSharpEngine.cs:line 372