[Mono-bugs] [Bug 76655][Nor] New - Assembly loading problems are not reported in a System.CodeDom compile.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Nov 9 12:11:24 EST 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by d.moonfire at mfgames.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76655

--- shadow/76655	2005-11-09 12:11:24.000000000 -0500
+++ shadow/76655.tmp.8448	2005-11-09 12:11:24.000000000 -0500
@@ -0,0 +1,142 @@
+Bug#: 76655
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: d.moonfire at mfgames.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Assembly loading problems are not reported in a System.CodeDom compile.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+When CodeDom is used to create a file that has trouble loading, such as
+when there is a missing namespace, it continues to try loading the compiled
+DLL even though it was not generated.
+
+
+Steps to reproduce the problem:
+1. Unzip the attached code.
+2. Run "make" (review the code of course)
+
+Actual Results:
+
+mcs /t:library TestNamespace.cs
+mcs /t:library TestNamespace2.cs /r:TestNamespace.dll
+mcs CodeDomTest.cs /r:TestNamespace2.dll
+rm TestNamespace.dll
+mono \
+--trace=M:Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString \
+./CodeDomTest.exe
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8210190:], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8316bd0:** (/usr/lib/mono/1.0/mcs.exe:2990): WARNING **:
+The following assembly referenced from /tmp/test-case-3/TestNamespace2.dll
+could not be loaded:], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x82a6f00:     Assembly:   TestNamespace   
+(assemblyref_index=0)], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8298f40:     Version:    0.0.0.0], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8298f00:     Public Key: (none)], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x831de00:The assembly was not found in the Global
+Assembly Cache, a path listed in the MONO_PATH environment variable, or in
+the location of the executing assembly (/tmp/test-case-3).], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8210180:], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8210170:], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8316a80:** (/usr/lib/mono/1.0/mcs.exe:2990): WARNING **:
+The class TestNamespace.A could not be loaded, used in
+/tmp/test-case-3/TestNamespace2.dll (token 0x01000001)], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8210160:], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x829db40:** ERROR **: file class.c: line 2233
+(mono_class_setup_parent): should not be reached], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x826aac8:aborting...], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+ENTER: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)([STRING:0x8210150:], )
+LEAVE: Mono.CSharp.CSharpCodeCompiler:CreateErrorFromString
+(string)[OBJECT:(nil)]
+EXCEPTION handling: FileNotFoundException
+
+Unhandled Exception: System.IO.FileNotFoundException: Could not find file
+"/tmp/93702.dll". : /tmp/93702.dll
+in <0x002bb> System.IO.FileStream:.ctor (System.String name, FileMode mode,
+FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync,
+Boolean anonymous)
+in <0x0001f> System.IO.FileStream:.ctor (System.String name, FileMode mode,
+FileAccess access, FileShare share)
+in (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor
+(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
+in <0x00021> System.IO.File:OpenRead (System.String path)
+in <0x002f8> Mono.CSharp.CSharpCodeCompiler:CompileFromFileBatch
+(System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames)
+in <0x00022> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromFileBatch
+(System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames)
+in <0x00305> Mono.CSharp.CSharpCodeCompiler:CompileFromDomBatch
+(System.CodeDom.Compiler.CompilerParameters options,
+System.CodeDom.CodeCompileUnit[] ea)
+in <0x00022> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDomBatch
+(System.CodeDom.Compiler.CompilerParameters options,
+System.CodeDom.CodeCompileUnit[] ea)
+in <0x0003c> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDom
+(System.CodeDom.Compiler.CompilerParameters options,
+System.CodeDom.CodeCompileUnit e)
+in <0x0018e> CodeDomTest:Compile (System.CodeDom.CodeNamespace cns)
+in <0x0017b> CodeDomTest:CreateSimpleCode ()
+in <0x00024> CodeDomTest:Main (System.String[] args)
+make: *** [build] Error 1
+
+Compilation exited abnormally with code 2 at Wed Nov  9 10:20:01
+
+
+Expected Results:
+
+It should have reported the error, then thrown an exception.
+
+How often does this happen? 
+
+Every time for me.
+
+Additional Information:


More information about the mono-bugs mailing list