[Mono-bugs] [Bug 564305] New: Trying to populate a DataGridViewCell gives NullReferenceException ONLY on OS X

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Dec 12 20:27:05 EST 2009


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

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


           Summary: Trying to populate a DataGridViewCell gives
                    NullReferenceException ONLY on OS X
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: iosglpgc at teleline.es
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_1; es-es)
AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9

While trying to run my application it gives the following crash.

System.NullReferenceException: Object reference not set to an instance of an
object
  at System.Windows.Forms.DataGridViewCell.GetValue (Int32 rowIndex) [0x00042]
in
/private/tmp/monobuild/build/BUILD/mono-2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewCell.cs:930 
  at System.Windows.Forms.DataGridViewCell.get_Value () [0x00000] in
/private/tmp/monobuild/build/BUILD/mono-2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewCell.cs:382 
  at System.Windows.Forms.DataGridViewCell.SetValue (Int32 rowIndex,
System.Object value) [0x00000] in
/private/tmp/monobuild/build/BUILD/mono-2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewCell.cs:1326 
  at System.Windows.Forms.DataGridViewCell.set_Value (System.Object value)
[0x00000] in
/private/tmp/monobuild/build/BUILD/mono-2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewCell.cs:385 
  at System.Windows.Forms.DataGridViewRow.SetValues (System.Object[] values)
[0x00074] in
/private/tmp/monobuild/build/BUILD/mono-2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewRow.cs:488 
  at bot.DataGridViewClientRow..ctor (System.Windows.Forms.DataGridView
gridView, bot.BotAccount botAccount) [0x00000] in <filename unknown>:0 
  at bot.GUI.frmMain.frmAddAcc_OnAddAccount (bot.BotAccount botAccount)
[0x00000] in <filename unknown>:0 
  at bot.GUI.frmMain.LoadXmlAccounts (System.String file) [0x00000] in
<filename unknown>:0 
  at bot.GUI.frmMain.LoadXmlAccounts () [0x00000] in <filename unknown>:0 
  at bot.GUI.frmMain.frmMain_Load (System.Object sender, System.EventArgs e)
[0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00022] in
/private/tmp/monobuild/build/BUILD/mono-2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2162 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00029] in
/private/tmp/monobuild/build/BUILD/mono-2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2988 

This happens in Mac OS X only no matter if the application is compiled with
Mono or Microsoft compilers.
This DOES NOT happen in Linux (x64) neither Windows (Mono and .NET Framework).

Failing code in question is as following:
 public class DataGridViewClientRow : DataGridViewRow
    {
        private bot.BotAccount botAccount;
        private DataGridView gridView;

        public DataGridViewClientRow(DataGridView gridView, bot.BotAccount
botAccount)
        {        
            this.botAccount = botAccount;
            this.gridView = gridView;
            base.CreateCells(gridView);
            base.SetValues(new object[] { botAccount.LoginDetails.FullName,
bot.Localization.clResourceManager.getText("botAccount.Offline"),
botAccount.LoginDetails.MasterName, botAccount.LoginDetails.StartLocation });
        }

All of the arguments inside SetValues are strings, none is null.

Reproducible: Always

Steps to Reproduce:
1. Run the application in Mac OS X
2.
3.

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


More information about the mono-bugs mailing list