[Mono-bugs] [Bug 424981] New: Winforms does not have a fallback for a missing mime type
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Sep 9 17:21:37 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=424981
Summary: Winforms does not have a fallback for a missing mime
type
Product: Mono: Class Libraries
Version: 2.0
Platform: i386
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: paul at all-the-johnsons.co.uk
QAContact: mono-bugs at lists.ximian.com
Found By: ---
The following code causes a winforms application to fail if the system does not
have a mime type set for a .spec file (and possibly for other files)
private string createDialog()
{
OpenFileDialog filer = new OpenFileDialog();
filer.Filter = "spec files (*.spec)|*.spec";
filer.Title = "Select a spec file";
return ( filer.ShowDialog() == DialogResult.OK )
? filer.FileName : null;
}
private void button1Click(object sender, EventArgs e)
{
createDialog();
}
The app falls over with the following throwback
Unhandled Exception: System.ArgumentNullException: Argument cannot be
null.
Parameter name: value
at System.Windows.Forms.ImageList+ImageCollection+ImageListItem..ctor
(System.Drawing.Image value) [0x0003b]
in
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs:202
at System.Windows.Forms.ImageList+ImageCollection+ImageListItem..ctor
(System.Drawing.Image value, Color transparentColor) [0x00000]
in /home/paul/rpmbuild/BUILD/mono-2.0/mcs/build/common/Consts.cs:1
at System.Windows.Forms.ImageList+ImageCollection.Add
(System.Drawing.Image value, Color transparentColor) [0x00000]
in
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs:716
at System.Windows.Forms.GnomeHandler.AddAndGetIconIndex (System.String
filename, System.String mime_type) [0x0000c]
in
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs:374
at System.Windows.Forms.MimeIconEngine.GetIconIndexForFile
(System.String full_filename) [0x0006b]
in
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs:159
at System.Windows.Forms.FileSystem.GetFileFSEntry (System.IO.FileInfo
fileinfo) [0x00043]
in
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3597
at System.Windows.Forms.FileSystem.GetNormalFolderContent
(System.String from_folder,
System.Collections.Specialized.StringCollection filters,
System.Collections.ArrayList& directories_out,
System.Collections.ArrayList& files_out) [0x000ea]
in
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3543
at System.Windows.Forms.FileSystem.GetFolderContent
(System.Collections.Specialized.StringCollection filters,
System.Collections.ArrayList& directories_out,
System.Collections.ArrayList& files_out) [0x0016f]
in
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3465
at System.Windows.Forms.MWFVFS+WorkerThread.GetFolderContentThread ()
[0x00000]
in
/home/paul/rpmbuild/BUILD/mono-2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3240
The application was terminated by a signal: SIGHUP
--
Configure bugmail: https://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