[Mono-bugs] [Bug 648481] New: Several Rules fail with an ArgumentOutOfRangeException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Oct 21 17:15:19 EDT 2010



           Summary: Several Rules fail with an ArgumentOutOfRangeException
    Classification: Mono
           Product: Mono: Tools
           Version: 2.6.x
          Platform: i686
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Gendarme
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: donovan_aaron at bah.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=396405)
 --> (http://bugzilla.novell.com/attachment.cgi?id=396405)
Assembly under inspection

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3

This is similar to Bug 621968. However, this happens with and
yesterday's code from github. 

Rule:    Gendarme.Rules.Design.TypesWithDisposableFieldsShouldBeDisposableRule

Target:    Scrpt.ICML.Version41.Validation.PubsValidator

Stack trace: System.ArgumentOutOfRangeException: Index was out of range. Must
be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32
   at Mono.Cecil.ModuleReferenceCollection.get_Item(Int32 index)
   at Mono.Cecil.ReflectionReader.GetExportedTypeScope(MetadataToken scope)
   at Mono.Cecil.AggressiveReflectionReader.ReadExternTypes()
   at Mono.Cecil.ReflectionReader.VisitModuleDefinition(ModuleDefinition mod)
   at Mono.Cecil.StructureReader.TerminateAssemblyDefinition(AssemblyDefinition
   at Mono.Cecil.AssemblyDefinition.Accept(IReflectionStructureVisitor visitor)
   at Mono.Cecil.AssemblyFactory.GetAssembly(ImageReader irv, Boolean
   at Mono.Cecil.BaseAssemblyResolver.GetAssemblyInGac(AssemblyNameReference
   at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name)
   at Gendarme.Framework.AssemblyResolver.Resolve(AssemblyNameReference name)
   at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
   at Mono.Cecil.TypeReference.Resolve()
   at Gendarme.Framework.Runner.OnType(RunnerEventArgs e)
   at Gendarme.GuiRunner.OnType(RunnerEventArgs e)
   at Gendarme.Framework.Runner.Run()
   at Gendarme.GuiRunner.Execute()

This error occurs on both a Windows XP and Vista machine. If we turn off the
offending runs (there are more than one), it runs to completion. We have found
one workstation that works successfully inspecting the same dll with all rules. 

Reproducible: Sometimes

Steps to Reproduce:
As mentioned, happens or doesn't on a given system, but behavior is consistent
for a given machine.
1. Run Gendarme Wizard.
2. Add Scrpt.dll
3. Include all rules.
4. Accept defaults and hit next.
Actual Results:  
Some results are found and the application errors out with the static trace.

Expected Results:  
Scan would run to completion

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