[Mono-list] MCS: Exception caught by the compiler while compiling

Jochen Wezel jwezel@compumaster.de
Tue, 30 Dec 2003 00:29:35 +0100


This is a multi-part message in MIME format.

------_=_NextPart_001_01C3CE63.9F09E116
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello!
=20
Here is a nice question for the mcs.exe developers:
=20
Does somebody has an idea why the following line breaks the compilation =
in Mono (MS.NET works fine)?=20

	NUnit.Framework.Assertion.AssertEquals ("JW#Replace/10", null, =
Strings.Replace(String.Empty, "=C4=D6", =
"deee",1,-1,CompareMethod.Binary));=20

and the mcs compiler throws the following exception (see below for the =
complete log):

	Exception caught by the compiler while compiling:
	   Block that caused the problem begin at: Test/StringsTest.cs: (1237)
	                     Block being compiled: [Test/StringsTest.cs: =
(1238),Test/StringsTest.cs: (1358)]

Where is the currently now allowed method or call or ...?

Thanks!

Jochen

=20

Complete log of my compilation in /mcs/class/Microsoft.VisualBasic/

	[root@redhat Microsoft.VisualBasic]# make test
	touch ../../build/deps/Microsoft.VisualBasic_test.dll.stamp
	MONO_PATH=3D"../../class/lib:$MONO_PATH" mono  ../../mcs/mcs.exe   =
-d:NET_1_1 -d:ONLY_1_1 -g /target:library =
/out:Microsoft.VisualBasic_test.dll =
/r:../../class/lib/Microsoft.VisualBasic.dll =
/r:../../class/lib/NUnit.Framework.dll  =
@../../build/deps/Microsoft.VisualBasic_test.dll.response
	Exception caught by the compiler while compiling:
	   Block that caused the problem begin at: Test/StringsTest.cs: (1237)
	                     Block being compiled: [Test/StringsTest.cs: =
(1238),Test/StringsTest.cs: (1358)]

	Unhandled Exception: System.NotImplementedException: The requested =
feature is not yet implemented
	in <0x00030> =
Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute:.ctor ()
	in (unmanaged) /usr/local/lib/libmono.so.0 [0x4004576b]
	in (unmanaged) /usr/local/lib/libmono.so.0(mono_runtime_invoke+0x23) =
[0x4007bdb7]
	in (unmanaged) /usr/local/lib/libmono.so.0 [0x40076d60]
	in (unmanaged) =
/usr/local/lib/libmono.so.0(mono_custom_attrs_construct+0x7c) =
[0x40076fa0]
	in (unmanaged) =
/usr/local/lib/libmono.so.0(mono_reflection_get_custom_attrs+0xd8) =
[0x4007758c]
	in <0x000a4> System.MonoCustomAttrs:from_cache =
(System.Reflection.ICustomAttributeProvider)
	in <0x0009a> System.MonoCustomAttrs:GetCustomAttributes =
(System.Reflection.ICustomAttributeProvider,System.Type,bool)
	in <0x00015> System.Reflection.ParameterInfo:GetCustomAttributes =
(System.Type,bool)
	in <0x00070> Mono.CSharp.ReflectionParameters:.ctor =
(System.Reflection.ParameterInfo[])
	in <0x00100> Mono.CSharp.Invocation:GetParameterData =
(System.Reflection.MethodBase)
	in <0x0005d> Mono.CSharp.Invocation:IsApplicable =
(Mono.CSharp.EmitContext,System.Collections.ArrayList,System.Reflection.M=
ethodBase)
	in <0x00226> Mono.CSharp.Invocation:OverloadResolve =
(Mono.CSharp.EmitContext,Mono.CSharp.MethodGroupExpr,System.Collections.A=
rrayList,Mono.CSharp.Location)
	in <0x0032e> Mono.CSharp.Invocation:DoResolve (Mono.CSharp.EmitContext)
	in <0x000e0> Mono.CSharp.Expression:Resolve =
(Mono.CSharp.EmitContext,Mono.CSharp.ResolveFlags)
	in <0x00019> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext)
	in <0x000e5> Mono.CSharp.Argument:Resolve =
(Mono.CSharp.EmitContext,Mono.CSharp.Location)
	in <0x0026b> Mono.CSharp.Invocation:DoResolve (Mono.CSharp.EmitContext)
	in <0x000e0> Mono.CSharp.Expression:Resolve =
(Mono.CSharp.EmitContext,Mono.CSharp.ResolveFlags)
	in <0x00019> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext)
	in <0x00021> Mono.CSharp.ExpressionStatement:ResolveStatement =
(Mono.CSharp.EmitContext)
	in <0x0001d> Mono.CSharp.StatementExpression:Resolve =
(Mono.CSharp.EmitContext)
	in <0x001c9> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext)
	in <0x000d3> Mono.CSharp.EmitContext:EmitTopBlock =
(Mono.CSharp.Block,Mono.CSharp.InternalParameters,Mono.CSharp.Location)
	in <0x0023a> Mono.CSharp.EmitContext:EmitTopBlock =
(Mono.CSharp.Block,Mono.CSharp.InternalParameters,Mono.CSharp.Location)
	in <0x0042b> Mono.CSharp.MethodData:Emit =
(Mono.CSharp.TypeContainer,Mono.CSharp.Block,object)
	in <0x00038> Mono.CSharp.Method:Emit (Mono.CSharp.TypeContainer)
	in <0x0026f> Mono.CSharp.TypeContainer:Emit ()
	in <0x0060f> Mono.CSharp.RootContext:EmitCode ()
	in <0x00ab7> Mono.CSharp.Driver:MainDriver (string[])
	in <0x0001b> Mono.CSharp.Driver:Main (string[])

	make: *** [Microsoft.VisualBasic_test.dll] Fehler 1
=09


------_=_NextPart_001_01C3CE63.9F09E116
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=3Dltr><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D152071523-29122003><SPAN=20
class=3D152071523-29122003>Hello!</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D152071523-29122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D152071523-29122003>Here=20
is a nice question for the mcs.exe developers:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D152071523-29122003></SPAN></FONT>&nbsp;</DIV><SPAN=20
class=3D152071523-29122003></SPAN><FONT face=3DArial><FONT =
color=3D#0000ff><FONT=20
size=3D2><SPAN class=3D152071523-29122003>Does somebody has an idea why =
the=20
following line breaks the compilation in Mono (MS.NET works=20
fine)?</SPAN></FONT></FONT></FONT>
<DIV></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV><FONT color=3D#000000>
  <P><FONT size=3D2><FONT=20
  face=3D"Courier New">NUnit.Framework.Assertion.AssertEquals =
("JW#Replace/10",=20
  <FONT color=3D#0000ff>null</FONT>, Strings.Replace(String.Empty, =
"=C4=D6",=20
  "deee",1,-1,CompareMethod.Binary));<SPAN =
class=3D152071523-29122003><FONT=20
  =
color=3D#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></P></DIV></BLOCKQUOTE>=

<P dir=3Dltr><FONT size=3D2><FONT face=3DArial><SPAN =
class=3D152071523-29122003><FONT=20
color=3D#0000ff>and th</FONT></SPAN></FONT></FONT><FONT size=3D2><FONT=20
face=3DArial><SPAN class=3D152071523-29122003><FONT color=3D#0000ff>e =
mcs compiler=20
throws the following exception (see below for the complete=20
log):</FONT></SPAN></FONT></FONT></P>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <P dir=3Dltr><FONT size=3D2><FONT face=3D"Courier New"><SPAN=20
  class=3D152071523-29122003>Exception caught by the compiler while=20
  compiling:<BR>&nbsp;&nbsp; Block that caused the problem begin at:=20
  Test/StringsTest.cs:=20
  =
(1237)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  Block being compiled: [Test/StringsTest.cs: =
(1238),Test/StringsTest.cs:=20
  (1358)]</SPAN></FONT></FONT></P></BLOCKQUOTE>
<P dir=3Dltr><FONT size=3D2><FONT face=3DArial><SPAN =
class=3D152071523-29122003><FONT=20
color=3D#0000ff>Where is the currently now allowed method or call or=20
...?</FONT></SPAN></FONT></FONT></P>
<P dir=3Dltr><FONT size=3D2><FONT face=3DArial><SPAN =
class=3D152071523-29122003><FONT=20
color=3D#0000ff>Thanks!</FONT></SPAN></FONT></FONT></P>
<P dir=3Dltr><FONT size=3D2><FONT face=3DArial><SPAN =
class=3D152071523-29122003><FONT=20
color=3D#0000ff>Jochen</FONT></SPAN></FONT></FONT></P>
<P dir=3Dltr><FONT size=3D2><FONT face=3DArial><SPAN =
class=3D152071523-29122003><FONT=20
color=3D#0000ff></FONT></SPAN></FONT></FONT>&nbsp;</P>
<P dir=3Dltr><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D152071523-29122003><STRONG>Complete log of my compilation in=20
/mcs/class/Microsoft.VisualBasic/</STRONG></SPAN></FONT></P>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <P dir=3Dltr><FONT face=3D"Courier New" size=3D2><SPAN=20
  class=3D152071523-29122003>[root@redhat Microsoft.VisualBasic]# make=20
  test<BR>touch=20
  =
../../build/deps/Microsoft.VisualBasic_test.dll.stamp<BR>MONO_PATH=3D"../=
../class/lib:$MONO_PATH"=20
  mono&nbsp; ../../mcs/mcs.exe&nbsp;&nbsp; -d:NET_1_1 -d:ONLY_1_1 -g=20
  /target:library /out:Microsoft.VisualBasic_test.dll=20
  /r:../../class/lib/Microsoft.VisualBasic.dll=20
  /r:../../class/lib/NUnit.Framework.dll&nbsp;=20
  @../../build/deps/Microsoft.VisualBasic_test.dll.response<BR>Exception =
caught=20
  by the compiler while compiling:<BR>&nbsp;&nbsp; Block that caused the =
problem=20
  begin at: Test/StringsTest.cs:=20
  =
(1237)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  Block being compiled: [Test/StringsTest.cs: =
(1238),Test/StringsTest.cs:=20
  (1358)]</SPAN></FONT></P>
  <P dir=3Dltr><FONT face=3D"Courier New" size=3D2><SPAN=20
  class=3D152071523-29122003>Unhandled Exception: =
System.NotImplementedException:=20
  The requested feature is not yet implemented<BR>in &lt;0x00030&gt;=20
  Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute:.ctor =
()<BR>in=20
  (unmanaged) /usr/local/lib/libmono.so.0 [0x4004576b]<BR>in (unmanaged) =

  /usr/local/lib/libmono.so.0(mono_runtime_invoke+0x23) =
[0x4007bdb7]<BR>in=20
  (unmanaged) /usr/local/lib/libmono.so.0 [0x40076d60]<BR>in (unmanaged) =

  /usr/local/lib/libmono.so.0(mono_custom_attrs_construct+0x7c)=20
  [0x40076fa0]<BR>in (unmanaged)=20
  /usr/local/lib/libmono.so.0(mono_reflection_get_custom_attrs+0xd8)=20
  [0x4007758c]<BR>in &lt;0x000a4&gt; System.MonoCustomAttrs:from_cache=20
  (System.Reflection.ICustomAttributeProvider)<BR>in &lt;0x0009a&gt;=20
  System.MonoCustomAttrs:GetCustomAttributes=20
  (System.Reflection.ICustomAttributeProvider,System.Type,bool)<BR>in=20
  &lt;0x00015&gt; System.Reflection.ParameterInfo:GetCustomAttributes=20
  (System.Type,bool)<BR>in &lt;0x00070&gt;=20
  Mono.CSharp.ReflectionParameters:.ctor=20
  (System.Reflection.ParameterInfo[])<BR>in &lt;0x00100&gt;=20
  Mono.CSharp.Invocation:GetParameterData =
(System.Reflection.MethodBase)<BR>in=20
  &lt;0x0005d&gt; Mono.CSharp.Invocation:IsApplicable=20
  =
(Mono.CSharp.EmitContext,System.Collections.ArrayList,System.Reflection.M=
ethodBase)<BR>in=20
  &lt;0x00226&gt; Mono.CSharp.Invocation:OverloadResolve=20
  =
(Mono.CSharp.EmitContext,Mono.CSharp.MethodGroupExpr,System.Collections.A=
rrayList,Mono.CSharp.Location)<BR>in=20
  &lt;0x0032e&gt; Mono.CSharp.Invocation:DoResolve=20
  (Mono.CSharp.EmitContext)<BR>in &lt;0x000e0&gt; =
Mono.CSharp.Expression:Resolve=20
  (Mono.CSharp.EmitContext,Mono.CSharp.ResolveFlags)<BR>in =
&lt;0x00019&gt;=20
  Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext)<BR>in =
&lt;0x000e5&gt;=20
  Mono.CSharp.Argument:Resolve=20
  (Mono.CSharp.EmitContext,Mono.CSharp.Location)<BR>in &lt;0x0026b&gt;=20
  Mono.CSharp.Invocation:DoResolve (Mono.CSharp.EmitContext)<BR>in=20
  &lt;0x000e0&gt; Mono.CSharp.Expression:Resolve=20
  (Mono.CSharp.EmitContext,Mono.CSharp.ResolveFlags)<BR>in =
&lt;0x00019&gt;=20
  Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext)<BR>in =
&lt;0x00021&gt;=20
  Mono.CSharp.ExpressionStatement:ResolveStatement=20
  (Mono.CSharp.EmitContext)<BR>in &lt;0x0001d&gt;=20
  Mono.CSharp.StatementExpression:Resolve =
(Mono.CSharp.EmitContext)<BR>in=20
  &lt;0x001c9&gt; Mono.CSharp.Block:Resolve =
(Mono.CSharp.EmitContext)<BR>in=20
  &lt;0x000d3&gt; Mono.CSharp.EmitContext:EmitTopBlock=20
  =
(Mono.CSharp.Block,Mono.CSharp.InternalParameters,Mono.CSharp.Location)<B=
R>in=20
  &lt;0x0023a&gt; Mono.CSharp.EmitContext:EmitTopBlock=20
  =
(Mono.CSharp.Block,Mono.CSharp.InternalParameters,Mono.CSharp.Location)<B=
R>in=20
  &lt;0x0042b&gt; Mono.CSharp.MethodData:Emit=20
  (Mono.CSharp.TypeContainer,Mono.CSharp.Block,object)<BR>in =
&lt;0x00038&gt;=20
  Mono.CSharp.Method:Emit (Mono.CSharp.TypeContainer)<BR>in =
&lt;0x0026f&gt;=20
  Mono.CSharp.TypeContainer:Emit ()<BR>in &lt;0x0060f&gt;=20
  Mono.CSharp.RootContext:EmitCode ()<BR>in &lt;0x00ab7&gt;=20
  Mono.CSharp.Driver:MainDriver (string[])<BR>in &lt;0x0001b&gt;=20
  Mono.CSharp.Driver:Main (string[])</SPAN></FONT></P>
  <P dir=3Dltr><FONT size=3D2><SPAN class=3D152071523-29122003><FONT=20
  face=3D"Courier New">make: *** [Microsoft.VisualBasic_test.dll] Fehler =

  1<BR></FONT></SPAN></P></BLOCKQUOTE></FONT></FONT></BODY></HTML>

------_=_NextPart_001_01C3CE63.9F09E116--