[Mono-bugs] [Bug 586645] New: NullReferenceException from MethodReference.Resolve() processing Cadenza

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 9 10:04:03 EST 2010


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

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


           Summary: NullReferenceException from MethodReference.Resolve()
                    processing Cadenza
    Classification: Mono
           Product: Mono: Tools
           Version: SVN
          Platform: x86-64
        OS/Version: openSUSE 11.2
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Gendarme
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jpryor at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


svn trunk r153325 generates a NullReferenceException when processing
Cadenza.dll.

To reproduce:

  $ git clone git://gitorious.org/cadenza/cadenza.git
  $ cd cadenza
  $ xbuild
  $ gendarme --html errors.html bin/Debug/Cadenza.dll

Expected results:

  The file errors.html exists and contains information.

Actual results:

  Gendarme v2.7.0.0
  Copyright (C) 2005-2010 Novell, Inc. and contributors

  Initialization: 0.5 seconds
  Cadenza.dll
  An uncaught exception occured. Please fill a bug report at
https://bugzilla.novell.com/
  Rule:   
Gendarme.Rules.Correctness.AvoidCodeWithSideEffectsInConditionalCodeRule
  Target:    System.Boolean
Cadenza.RectangularArrayCoda/<CreateColumnIterator>c__Iterator33`1::MoveNext()
  Stack trace: System.NullReferenceException: Object reference not set to an
instance of an object
    at Mono.Cecil.MethodReference.Resolve () [0x0000f] in
/home/jon/Development/mono-HEAD/mcs/class/Mono.Cecil/Mono.Cecil/MethodReference.cs:116 
    at
Gendarme.Rules.Correctness.AvoidMethodsWithSideEffectsInConditionalCodeRule.ConditionalOn
(Mono.Cecil.MethodReference mr) [0x00000] in <filename unknown>:0 
    at
Gendarme.Rules.Correctness.AvoidCodeWithSideEffectsInConditionalCodeRule.CheckMethod
(Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0 
    at Gendarme.Framework.Runner.OnMethod (Gendarme.Framework.RunnerEventArgs
e) [0x00000] in <filename unknown>:0 
    at Gendarme.Framework.Runner.Run () [0x00000] in <filename unknown>:0 
    at Gendarme.ConsoleRunner.Run () [0x00000] in <filename unknown>:0 
    at Gendarme.ConsoleRunner.Execute (System.String[] args) [0x00000] in
<filename unknown>:0 

The line of code in MethodReference.cs is:

  return declaringType.Module.Resolver.Resolve (this);

So somehow one of those members is null...

-- 
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