3

I sometimes get the following exception when compiling the Boo scripts:

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)

This happens only sometimes, usually on remote environment (I can see only the logs there). Still haven't found the way to reproduce it locally to debug it, monitor the memory consumption etc.

Does anyone have any clue? Do I need to take care of some unmanaged resources when compiling the Boo scripts?

TheKotlet
  • 71
  • 2
  • The comments of this [blog post](http://bloggingabout.net/blogs/dennis/archive/2009/06/08/attempted-to-read-or-write-protected-memory-in-a-net-application.aspx) suggests that setting the build configuration of the project to x86 would do the trick. Don't know if this could possibly help you? – Mia Clarke Mar 11 '13 at 16:37
  • same for me. x86 solved this, but it is not a solution. – Sergey Mirvoda Mar 12 '13 at 08:11

0 Answers0