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

Submitted by:  None
Submitted on:  Wed 29 Dec 2004 04:26:04 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

(Jump to the original submission 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>
Project 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>
Project Member
Thu 30 Dec 2004 01:08:08 PM UTC, comment #4:

fixed in cvs

Deryk Robosson <drobosson>
Project 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>
Project 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

 

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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 7 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 01 Jan 2005 02:53:44 AM UTCdrobossonStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Fri 31 Dec 2004 05:01:00 AM UTCS11001001StatusFixed=>None
  Open/ClosedClosed=>Open
Thu 30 Dec 2004 01:08:08 PM UTCdrobossonStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Wed 29 Dec 2004 02:53:14 PM UTCNoneAttached File-=>Added pnetcrash.zip, #2002

Back to the top


Powered by Savane 3.1-cleanup1