[Mono-bugs] [Bug 568955] New: System.InvalidOperationException: List has changed. from gmcs while compiling.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 7 16:00:10 EST 2010


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

http://bugzilla.novell.com/show_bug.cgi?id=568955#c0


           Summary: System.InvalidOperationException: List has changed.
                    from gmcs while compiling.
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.6.x
          Platform: x86
        OS/Version: openSUSE 11.2
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: pruiz at netway.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6)
Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)

While compiling code working fine with mono 2.4.3, with newer 2.6.1 I got this
internal error from gmcs:

                               Unhandled Exception:
Mono.CSharp.InternalErrorException: Rates/Specifications.cs(12
,24): QuietSwitch.Domain.RateOrderById.RateOrderById() --->
System.InvalidOperationException: List has changed.
                                at
System.Collections.ArrayList+SimpleEnumerator.MoveNext () [0x00000] in
<filename
 unknown>:0
                                at Mono.CSharp.Block.Resolve
(Mono.CSharp.BlockContext ec) [0x00000] in <filename u
nknown>:0
                                at Mono.CSharp.ToplevelBlock.Resolve
(Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc,
Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in <filename
unknown>:0
                                --- End of inner exception stack trace ---
                                at Mono.CSharp.TypeContainer.EmitConstructors
() [0x00000] in <filename unknown>:0
                                at Mono.CSharp.TypeContainer.EmitType ()
[0x00000] in <filename unknown>:0
                                at Mono.CSharp.RootContext.EmitCode ()
[0x00000] in <filename unknown>:0
                                at Mono.CSharp.Driver.Compile () [0x00000] in
<filename unknown>:0
                                at Mono.CSharp.Driver.Main (System.String[]
args) [0x00000] in <filename unknown>:0
/usr/lib/mono/2.0/Microsoft.CSharp.targets: error : Compiler crashed with code:
1.



Reproducible: Always

Steps to Reproduce:
1. Save the following sample code as 'p.cs':

using System;
using System.Linq;
using System.Linq.Expressions;

namespace Test {
  public class Rate {
        public int Id { get; protected set; }
  }

  public class RateOrderById : OrderBySpecification<Rate, int>
        {
                public RateOrderById()
                        : base(x => x.Id)
                {
                }
        }

    public class OrderBySpecification<T, O>
    {
        private readonly Expression<Func<T, O>> _predicate;

                public OrderBySpecification(Expression<Func<T, O>> predicate)
                {
                }
    }
}

2. Compile with gmcs /target:library p.cs

Actual Results:  
[root at Marge QuietSwitch]# gmcs /target:library p.cs

Unhandled Exception: Mono.CSharp.InternalErrorException: p.cs(12,24):
Test.RateOrderById.RateOrderById() ---> System.InvalidOperationException: List
has changed.
  at System.Collections.ArrayList+SimpleEnumerator.MoveNext () [0x00000] in
<filename unknown>:0
  at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in
<filename unknown>:0
  at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent,
Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md)
[0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename
unknown>:0
  at Mono.CSharp.TypeContainer.EmitType () [0x00000] in <filename unknown>:0
  at Mono.CSharp.RootContext.EmitCode () [0x00000] in <filename unknown>:0
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename
unknown>:0


Expected Results:  
Compile code normally.

-- 
Configure bugmail: http://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