[Mono-bugs] [Bug 405382] New: Compiler error when compiling valid C# code

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jul 1 10:25:09 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=405382


           Summary: Compiler error when compiling valid C# code
           Product: Mono: Compilers
           Version: 1.9.0
          Platform: Other
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: Ayende at ayende.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


While attempting to compile the SvnBridge
project(http://www.codeplex.com/SvnBridge), the compiler throw this error:

Building Project: TestsIntegration (Debug|Any CPU)
Performing main compilation...
Exception caught by the compiler while compiling:
   Block that caused the problem begin at:
/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderTests.cs(20,29):
                     Block being compiled:
[/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderTests.cs(21,17):,/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderTests.cs(28,17):]
System.NullReferenceException: Object reference not set to an instance of an
object
Internal compiler error at
/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderTests.cs(20,29)::
exception caught while emitting MethodBuilder
[TFSSourceControlProviderTests::TestAddFolderThatAlreadyExistsThrowsException]

/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderCommitTests.cs(71,35):
warning CS0219: The variable `response' is assigned but its value is never used
/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderCommitTests.cs(103,38):
warning CS0219: The variable `item' is assigned but its value is never used
/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderCommitTests.cs(158,30):
warning CS0219: The variable `created' is assigned but its value is never used
/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderCommitTests.cs(195,30):
warning CS0219: The variable `created' is assigned but its value is never used
/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderCommitTests.cs(221,30):
warning CS0219: The variable `created' is assigned but its value is never used
/home/linux/SvnBridge2/TestsIntegration/TFSSourceControlProviderCommitTests.cs(674,30):
warning CS0219: The variable `created' is assigned but its value is never used

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
  at Mono.CSharp.AnonymousMethodExpression.ExplicitTypeInference
(Mono.CSharp.TypeInferenceContext type_inference, System.Type delegate_type)
[0x00000] 
  at Mono.CSharp.TypeInferenceV3.InferInPhases (Mono.CSharp.EmitContext ec,
Mono.CSharp.TypeInferenceContext tic, ParameterData methodParameters) [0x00000] 
  at Mono.CSharp.TypeInferenceV3.InferMethodArguments (Mono.CSharp.EmitContext
ec, System.Reflection.MethodBase method) [0x00000] 
  at Mono.CSharp.TypeManager.InferTypeArguments (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments, System.Reflection.MethodBase& method)
[0x00000] 
  at Mono.CSharp.MethodGroupExpr.IsApplicable (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments, Int32 arg_count,
System.Reflection.MethodBase& method, System.Boolean& params_expanded_form)
[0x00000] 
  at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList& Arguments, Boolean may_fail, Location loc)
[0x00000] 
  at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.EmitContext ec)
[0x00000] 
  at Mono.CSharp.Invocation.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.Parameters
ip, IMethodData md, System.Boolean& unreachable) [0x00000] 



To reproduce:
1/ get the source zip from:

http://www.codeplex.com/SvnBridge/SourceControl/DownloadSourceCode.aspx?changeSetId=18831

2/ open in MonoDevelop
3/ Remove the project TestsUnit
4/ Remove the project TestsProtocol
5/ Rebuild solution
6/ You will get the error above

This project compiles successfully on MS .NET
Looking at the code, I can't see any reason why this is anything special.

Note that I am testing that on the Mono 1.9.1 VMWare


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


More information about the mono-bugs mailing list