bugDotGNU Portable.NET - Bugs: bug #11428, Empty ComboBox, null reference...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11428: Empty ComboBox, null reference exception

Submitter:  None
Submitted:  Wed 29 Dec 2004 04:26:04 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Sat 01 Jan 2005 02:53:44 AM UTC, comment #6: 

Reworked in CVS 01.Jan to use Items property consistantly throughout instead of items field.

Deryk Robosson <drobosson>
Group Member
Fri 31 Dec 2004 05:01:00 AM UTC, comment #5: 

Reopened per biiru's request.  A casual glance over the code suggests to me that the Items property should be used in set_DroppedDown rather than direct access to the items instance variable; others, however, are probably more qualified to make such judgements.

Stephen Compall <S11001001>
Group Member
Thu 30 Dec 2004 01:08:08 PM UTC, comment #4: 

fixed in cvs

Deryk Robosson <drobosson>
Group Member
Wed 29 Dec 2004 03:39:50 PM UTC, comment #3: 

just a note, this patch from cvs diff fixes it. But it is by no means a proper fix. the problem appears to stem from items being unitialized. this patch simply returns if items is unitialized.

Index: ComboBox.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/ComboBox.cs,v
retrieving revision 1.13
diff -r1.13 ComboBox.cs
235a236,237

>                                       if (items == null)
>                                               return;


Jacob Alberty <biiru>
Wed 29 Dec 2004 02:53:14 PM UTC, comment #2: 

I have attached a .zip file containing sourcecode (for sharpdevelop) and binary, to cause the crash load pnetcrash.exe up with ilrun then click on the arrow for the dropdown list. It should immediately crash, this was verified on cvs from approx 10 hours ago.

Anonymous
Wed 29 Dec 2004 04:58:54 AM UTC, comment #1: 

A small test case would help if you could provide one please.

Deryk Robosson <drobosson>
Group Member
Wed 29 Dec 2004 04:26:04 AM UTC, original submission:  

When clicking on the dropdown button for a combobox with no items the application exits with the following output.

Uncaught exception: System.NullReferenceException: The value 'null' was found where an instance of an object was required
        at System.Windows.Forms.ComboBox.set_DroppedDown(Boolean) in ./ComboBox.cs:236

I do have a sample application i can include, with source, that triggers this exception if it would help you

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #2301:  pnetcrash.zip added by None (12KiB - application/zip - Sample code with binary)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-01-01 drobosson StatusNone Fixed
    Open/ClosedOpen Closed
2004-12-31 S11001001 StatusFixed None
    Open/ClosedClosed Open
2004-12-30 drobosson StatusNone Fixed
    Open/ClosedOpen Closed
2004-12-29 None Attached File- Added pnetcrash.zip, #2002

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code