[Mono-bugs] [Bug 588356] New: NullReferenceException thrown System.Convert.ChangeType

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 15 10:19:27 EDT 2010


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

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


           Summary: NullReferenceException thrown
                    System.Convert.ChangeType
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: Vadim.Goldstein at safend.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=348437)
 --> (http://bugzilla.novell.com/attachment.cgi?id=348437)
Program.cs

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8)
Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729)

NullReferenceException thrown while calling to System.Convert.ChangeType.
It doesn't happen on ms.net.
I have attached source file of test case that reproduces the issue.

Exception:
{System.NullReferenceException: Object reference not set to an instance of an
object
  at System.Int32.FindSign (System.Int32& pos, System.String s,
System.Globalization.NumberFormatInfo nfi, System.Boolean& foundSign,
System.Boolean& negative) [0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System\Int32.cs:258 
  at System.Int64.Parse (System.String s, NumberStyles style, IFormatProvider
fp, Boolean tryParse, System.Int64& result, System.Exception& exc) [0x001d9] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System\Int64.cs:272 
  at System.Int64.Parse (System.String s, NumberStyles style, IFormatProvider
provider) [0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System\Int64.cs:468 
  at System.Int64.Parse (System.String s, IFormatProvider provider) [0x00000]
in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System\Int64.cs:189 
  at System.Convert.ToInt64 (System.String value, IFormatProvider provider)
[0x00009] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System\Convert.cs:1395 
  at System.String.System.IConvertible.ToInt64 (IFormatProvider provider)
[0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System\String.cs:2400 
  at System.Convert.ToType (System.Object value, System.Type conversionType,
IFormatProvider provider, Boolean try_target_to_type) [0x0016f] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System\Convert.cs:2900 
  at System.Convert.ChangeType (System.Object value, System.Type
conversionType, IFormatProvider provider) [0x00017] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System\Convert.cs:2495 
..


Reproducible: Always

Steps to Reproduce:
1. Just run the test case.
Actual Results:  
NullReferenceException is thrown.

Expected Results:  
Call to System.Convert.ChangeType succeeds.

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