3

在编译 Boo 脚本时,有时会出现以下异常:

A unexpexted thing happened, C:\Resources\temp\de4ee12533b34facbb80d007648a48f2.BackendRole\RoleTemp
output562348dc-eaec-41d3-9463-330b8bbe7ab8.bre(1,1): BCE0055: Boo.Lang.Compiler.CompilerError: Internal compiler error: Failed to create 'output562348dceaec-41d3-9463-330b8bbe7ab8.$Prepare$locals$3' type.. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Reflection.Emit.TypeBuilder.TermCreateClass(RuntimeModule module, Int32 tk, ObjectHandleOnStack type)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at Boo.Lang.Compiler.Steps.EmitAssembly.TypeCreator.HandleTypeCreation(TypeDefinition  type)
at Boo.Lang.Compiler.Steps.EmitAssembly.TypeCreator.CreateType(TypeDefinition type)
— End of inner exception stack trace —
at Boo.Lang.Compiler.Steps.EmitAssembly.TypeCreator.CreateType(TypeDefinition type)
at Boo.Lang.Compiler.Steps.EmitAssembly.TypeCreator.CreateTypes()
at Boo.Lang.Compiler.Steps.EmitAssembly.TypeCreator.Run()
at Boo.Lang.Compiler.Steps.EmitAssembly.CreateTypes(List`1 types)
at Boo.Lang.Compiler.Steps.EmitAssembly.DefineTypes()
at Boo.Lang.Compiler.Steps.EmitAssembly.Run()
at Boo.Lang.Compiler.CompilerPipeline.RunStep(CompilerContext context, ICompilerStep step)

这只有时会发生,通常是在远程环境中(我只能看到那里的日志)。仍然没有找到在本地重现它以调试它、监控内存消耗等的方法。

有没有人有任何线索?编译 Boo 脚本时是否需要处理一些非托管资源?

4

0 回答 0