Skip to content

Instantly share code, notes, and snippets.

@ArthurD
Created June 7, 2023 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArthurD/f8bad86a5432fc392db391a16254860d to your computer and use it in GitHub Desktop.
Save ArthurD/f8bad86a5432fc392db391a16254860d to your computer and use it in GitHub Desktop.
Unity Compile Error Log - 2022.3.1f1
Process terminated. System.TypeInitializationException: The type initializer for 'Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer' threw an exception.
---> System.OutOfMemoryException: Array dimensions exceeded supported range.
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer..cctor()
--- End of inner exception stack trace ---
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.QuickScanSyntaxToken()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.Lex(LexerMode mode)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser.PreLex()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser..ctor(Lexer lexer, LexerMode mode, CSharpSyntaxNode oldTree, IEnumerable`1 changes, Boolean allowModeReset, Boolean preLexIfNotIncremental, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser..ctor(Lexer lexer, CSharpSyntaxNode oldTree, IEnumerable`1 changes, LexerMode lexerMode, CancellationToken cancellationToken)
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
at Microsoft.CodeAnalysis.FailFast+<>c.<.cctor>b__5_0(System.Exception, Microsoft.CodeAnalysis.ErrorReporting.ErrorSeverity, Boolean)
at Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception, Microsoft.CodeAnalysis.ErrorReporting.ErrorSeverity, Boolean)
at Microsoft.CodeAnalysis.ErrorReporting.FatalError.ReportAndPropagateUnlessCanceled(System.Exception, System.Threading.CancellationToken, Microsoft.CodeAnalysis.ErrorReporting.ErrorSeverity)
at Roslyn.Utilities.RoslynParallel+<>c__DisplayClass1_0.<For>g__errorHandlingBody|0(Int32)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.QuickScanSyntaxToken()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.Lex(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LexerMode)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser.PreLex()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser..ctor(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer, Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LexerMode, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, System.Collections.Generic.IEnumerable`1<Microsoft.CodeAnalysis.Text.TextChangeRange>, Boolean, Boolean, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser..ctor(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer, Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode, System.Collections.Generic.IEnumerable`1<Microsoft.CodeAnalysis.Text.TextChangeRange>, Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LexerMode, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.ParseText(Microsoft.CodeAnalysis.Text.SourceText, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions, System.String, System.Collections.Immutable.ImmutableDictionary`2<System.String,Microsoft.CodeAnalysis.ReportDiagnostic>, System.Nullable`1<Boolean>, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CSharp.CSharpCompiler.ParseFile(Microsoft.CodeAnalysis.CSharp.CSharpParseOptions, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions, Microsoft.CodeAnalysis.Text.SourceText, Microsoft.CodeAnalysis.CommandLineSourceFile)
at Microsoft.CodeAnalysis.CSharp.CSharpCompiler.ParseFile(Microsoft.CodeAnalysis.CSharp.CSharpParseOptions, Microsoft.CodeAnalysis.CSharp.CSharpParseOptions, Boolean ByRef, Microsoft.CodeAnalysis.CommandLineSourceFile, Microsoft.CodeAnalysis.DiagnosticBag, System.String ByRef)
at Microsoft.CodeAnalysis.CSharp.CSharpCompiler+<>c__DisplayClass8_0.<CreateCompilation>b__0(Int32)
at Roslyn.Utilities.UICultureUtilities+<>c__DisplayClass6_0`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<WithCurrentUICulture>b__0(Int32)
at Roslyn.Utilities.RoslynParallel+<>c__DisplayClass1_0.<For>g__errorHandlingBody|0(Int32)
at System.Threading.Tasks.Parallel+<>c__DisplayClass19_0`1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<ForWorker>b__1(System.Threading.Tasks.RangeWorker ByRef, Int32, Boolean ByRef)
at System.Threading.Tasks.TaskReplicator+Replica.Execute()
at System.Threading.Tasks.TaskReplicator+Replica+<>c.<.ctor>b__4_0(System.Object)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task+<>c.<.cctor>b__272_0(System.Object)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
at System.Threading.Tasks.Task.ExecuteEntryUnsafe(System.Threading.Thread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
System.TypeInitializationException: The type initializer for 'Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer' threw an exception.
---> System.OutOfMemoryException: Array dimensions exceeded supported range.
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer..cctor()
--- End of inner exception stack trace ---
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.QuickScanSyntaxToken()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.Lex(LexerMode mode)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser.PreLex()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser..ctor(Lexer lexer, LexerMode mode, CSharpSyntaxNode oldTree, IEnumerable`1 changes, Boolean allowModeReset, Boolean preLexIfNotIncremental, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser..ctor(Lexer lexer, CSharpSyntaxNode oldTree, IEnumerable`1 changes, LexerMode lexerMode, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.ParseText(SourceText text, CSharpParseOptions options, String path, ImmutableDictionary`2 diagnosticOptions, Nullable`1 isGeneratedCode, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CSharp.CSharpCompiler.ParseFile(CSharpParseOptions parseOptions, CSharpParseOptions scriptParseOptions, SourceText content, CommandLineSourceFile file)
at Microsoft.CodeAnalysis.CSharp.CSharpCompiler.ParseFile(CSharpParseOptions parseOptions, CSharpParseOptions scriptParseOptions, Boolean& addedDiagnostics, CommandLineSourceFile file, DiagnosticBag diagnostics, String& normalizedFilePath)
at Microsoft.CodeAnalysis.CSharp.CSharpCompiler.<>c__DisplayClass8_0.<CreateCompilation>b__0(Int32 i)
at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param)
at Roslyn.Utilities.RoslynParallel.<>c__DisplayClass1_0.<For>g__errorHandlingBody|0(Int32 i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment