[Mono-winforms-list] OpenFileDialog throwing ArgumentNullException

Alexander Olk xenomorph2@onlinehome.de
Tue, 29 Mar 2005 16:40:02 +0200


Am Montag, den 28.03.2005, 16:36 -0800 schrieb Bill Medland: 
> Can anyone tell me, is this me doing something wrong or is it a current bug in 
> the code?
> 
> (Assuming I am doing the build properly) mono is the current version updated 
> 10 minutes ago.
> 
> Test program simply declares an OpenFileDialog
> 
> Program throws:
> 
> Unhandled Exception: System.ArgumentNullException: Cannot add null image
> Parameter name: value
> in <0x00104> System.Windows.Forms.ImageList+ImageCollection:Add 
> (System.Drawing.Image value)
> in <0x001a6> System.Windows.Forms.MWFFileView:.ctor ()
> in (wrapper remoting-invoke-with-check) System.Windows.Forms.MWFFileView:.ctor 
> ()
> in <0x00236> System.Windows.Forms.FileDialog+FileDialogPanel:.ctor 
> (System.Windows.Forms.FileDialog fileDialog)
> in (wrapper remoting-invoke-with-check) FileDialogPanel:.ctor 
> (System.Windows.Forms.FileDialog)
> in <0x000ad> System.Windows.Forms.OpenFileDialog:.ctor ()
> in (wrapper remoting-invoke-with-check) 
> System.Windows.Forms.OpenFileDialog:.ctor ()
> in <0x00024> ofd01:Main ()

Do me a favour and write a simple test program that uses a MessageBox.
Does it run ???
MessageBox uses images from the same resource files. The resources can
be found in mcs/class/Managed.Windows.Forms/resources.

Open-/SaveFileDialog work fine on Linux (that's where I'm writing and
testing it...). No problems with an empty ImageList...

Regards
Alexander Olk