AggregateException
Compile Pal Version 27.35
problem: an exception is passed to ouput
An exception was caught by the ExceptionHandler: System.AggregateException: 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. (Length cannot be less than zero. (Parameter 'length')) ---> System.ArgumentOutOfRangeException: Length cannot be less than zero. (Parameter 'length') at System.String.Substring(Int32 startIndex, Int32 length) at CompilePalX.GameConfigurationManager.ModifyCurrentContext(String val) in D:\a\CompilePal\CompilePal\CompilePalX\GameConfiguration\GameConfigurationManager.cs:line 59 at CompilePalX.Compiling.CompilePalLogger.Log(String s, Object[] formatStrings) in D:\a\CompilePal\CompilePal\CompilePalX\Compiling\Logger.cs:line 74 at CompilePalX.Compiling.CompilePalLogger.LogProgressive(String s) in D:\a\CompilePal\CompilePal\CompilePalX\Compiling\Logger.cs:line 157 at CompilePalX.Compilers.CompileExecutable.ReadOutput(CancellationToken cancellationToken) in D:\a\CompilePal\CompilePal\CompilePalX\Compilers\CompileExecutable.cs:line 108 at CompilePalX.Compilers.CompileExecutable.Run(CompileContext c, CancellationToken cancellationToken) in D:\a\CompilePal\CompilePal\CompilePalX\Compilers\CompileExecutable.cs:line 82 at CompilePalX.CompilingManager.CompileThreaded(CancellationToken cancellationToken) in D:\a\CompilePal\CompilePal\CompilePalX\Compiling\CompilingManager.cs:line 176 at CompilePalX.CompilingManager.<>c.<StartCompile>b__19_0() in D:\a\CompilePal\CompilePal\CompilePalX\Compiling\CompilingManager.cs:line 138 at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of inner exception stack trace ---
This breaks the precompiler properly finishing if it happens during precompiler steps: After precompiler, will not go to next task.
It seems to happen semi randomly
Can you please try the latest prerelease and see if the exception still happens?