[Mono-bugs] [Bug 491828] New: xbuild hides important error information

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 3 05:46:55 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=491828


           Summary: xbuild hides important error information
    Classification: Mono
           Product: Mono: Tools
           Version: 2.4.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: xbuild
        AssignedTo: jankit at novell.com
        ReportedBy: mfuzzey at parkeon.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User


Description of Problem:
This problem occurs with both the 2.4 release and the latest svn (revision
130875)

Steps to reproduce the problem:
1. Build a project depending on a missing assembly 
2. 


Actual Results:
partial xbuild output:
Target CoreCompile:

                Tool /usr/local/bin/gmcs execution started with arguments:
/noconfig /debug:full /debug+ /optimize- /out:obj//Debug/Fat_App.exe
/resource:obj//Debug/Fat_App.Form1.resources
/resource:obj//Debug/Fat_App.Resources.w.wav
Sources/FrameworkGraphics/BottomSliderAnimation.cs Form1.cs Form1.Designer.cs
Sources/FrameworkGraphics/Graphics.cs Sources/FrameworkGraphics/InfoShift.cs
Sources/PInvoke/MainTest.cs Sources/Sound_unloaded/PlaySound.cs Program.cs
Properties/AssemblyInfo.cs Sources/FrameworkGraphics/SquareAnimation.cs
/target:winexe /unsafe- /define:DEBUG;TRACE;WindowsCE
/reference:../References/GPRS_Test.dll
/reference:../References/GPS_Simple_Test.dll
/reference:/usr/local/lib/mono/2.0/mscorlib.dll
/reference:../References/OpenNETCF.dll
/reference:/usr/local/lib/mono/2.0/System.dll
/reference:/usr/local/lib/mono/2.0/System.Data.dll
/reference:/usr/local/lib/mono/2.0/System.Drawing.dll
/reference:/usr/local/lib/mono/2.0/System.Windows.Forms.dll
/reference:/usr/local/lib/mono/2.0/System.Xml.dll
/reference:/home/mfuzzey/work/linux/mx21/mono/cs-src/EBUS_FAT_CF2/DisplayTest/bin/Debug//SquareDisplayTest.dll
/reference:/home/mfuzzey/work/linux/mx21/mono/cs-src/EBUS_FAT_CF2/PrinterTest/TestApp/bin/Debug//TestApp.dll
/warn:4

: Internal compiler  error at Form1.cs(241,22): : exception caught while
emitting MethodBuilder [Form1::bTest1_Click]



Expected Results:
An error message explaining the problem

How often does this happen? 
always

Additional Information:
gmcs _does_ provide the right information but xbuild is hiding it.
Changing the gmcs wrapper script to save output to a file :

#!/bin/sh

exec /usr/local/bin/mono $MONO_OPTIONS /usr/local/lib/mono/2.0/gmcs.exe "$@" >
/tmp/gmcs.log 2>/tmp/gmcs.err


Gives the following:
gmcs.log:
Exception caught by the compiler while compiling:

   Block that caused the problem begin at: Form1.cs(241,22):

                     Block being compiled: [Form1.cs(242,9):,Form1.cs(267,9):]

System.TypeLoadException: Could not load type 'PrinterTestApp.Form1' from
assembly 'TestApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Internal compiler error at Form1.cs(241,22):: exception caught while emitting
MethodBuilder [Form1::bTest1_Click]


gmcs.err:
** (/usr/local/lib/mono/2.0/gmcs.exe:11365): WARNING **: The following assembly
referenced from
/home/mfuzzey/work/linux/mx21/mono/cs-src/EBUS_FAT_CF2/PrinterTest/TestApp/bin/Debug/TestApp.dll
could not be loaded:

     Assembly:   Manager    (assemblyref_index=0)

     Version:    1.0.3379.32634

     Public Key: (none)

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
(/home/mfuzzey/work/linux/mx21/mono/cs-src/EBUS_FAT_CF2/PrinterTest/TestApp/bin/Debug/).





** (/usr/local/lib/mono/2.0/gmcs.exe:11365): WARNING **: Could not load file or
assembly 'Manager, Version=1.0.3379.32634, Culture=neutral,
PublicKeyToken=null' or one of its dependencies.



Unhandled Exception: System.TypeLoadException: Could not load type
'PrinterTestApp.Form1' from assembly 'TestApp, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null'.

  at (wrapper managed-to-native) System.MonoType:GetMethodsByName
(string,System.Reflection.BindingFlags,bool,System.Type)

  at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] 

  at Mono.CSharp.MemberCache.AddMethods (BindingFlags bf, System.Type type)
[0x00000] 

  at Mono.CSharp.MemberCache.AddMethods (System.Type type) [0x00000] 

  at Mono.CSharp.MemberCache..ctor (IMemberContainer container) [0x00000] 

  at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] 

  at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] 

  at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] 

  at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type t,
MemberTypes mt, BindingFlags bf, System.String name, System.Boolean&
used_cache) [0x00000] 

  at Mono.CSharp.TypeManager.RealMemberLookup (System.Type invocation_type,
System.Type qualifier_type, System.Type queried_type, MemberTypes mt,
BindingFlags original_bf, System.String name, IList almost_match) [0x00000] 

  at Mono.CSharp.TypeManager.MemberLookup (System.Type invocation_type,
System.Type qualifier_type, System.Type queried_type, MemberTypes mt,
BindingFlags original_bf, System.String name, IList almost_match) [0x00000] 

  at Mono.CSharp.Expression.MemberLookup (System.Type container_type,
System.Type qualifier_type, System.Type queried_type, System.String name,
MemberTypes mt, BindingFlags bf, Location loc) [0x00000] 

  at Mono.CSharp.Expression.MemberLookupFinal (Mono.CSharp.EmitContext ec,
System.Type qualifier_type, System.Type queried_type, System.String name,
MemberTypes mt, BindingFlags bf, Location loc) [0x00000] 

  at Mono.CSharp.New.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 

  at Mono.CSharp.Assign.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 

  at Mono.CSharp.SimpleAssign.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 

  at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.EmitContext
ec) [0x00000] 

  at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.EmitContext ec)
[0x00000] 

  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 

  at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
anonymous_method_host, Mono.CSharp.ToplevelBlock block,
Mono.CSharp.ParametersCompiled ip, IMethodData md, System.Boolean& unreachable)
[0x00000] 



Thus gmcs clearly indicates the problem is due to a missing assembly but that
cannot be seen from xbuild.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list