[Mono-winforms-list] Oddball SWF problem.

Ivan N. Zlatev contact at i-nz.net
Tue Sep 9 17:15:53 EDT 2008


On Tue, Sep 9, 2008 at 1:22 PM, Paul <paul at all-the-johnsons.co.uk> wrote:
> Hi,
>
> I'm using a bog standard OpenFileDialog with Mono 2.0 RC 1 (code below).
> When I run the app, everything is fine until I go to the directory which
> contains .spec files (these are plain text files used for packaging
> under Linux).. it then goes kabloom with the following throwback (from
> MD 1.9)

It seems that on your setup there is no icon associated with the mime
type for the ".spec" and there is no fallback by the gnome/gtk
functions (weird) and we don't handle that nicely. I can't reproduce
here (.spec mime type is text/x-rpm-spec and icon is the text file
one). I suggest you file a bug so we can fix this. It's probably just
a missing null check somewhere.

>
> 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
>
> Code which did the nasty....
>
> 8-->
>                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();
>                }
> <--8
>
> Nothing nasty, it just doesn't behave!
>
> Any ideas?
>
> TTFN
>
> Paul
> --
> Sie können mich aufreizen und wirklich heiß machen!
>
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>



-- 
Kind Regards,
Ivan N. Zlatev


More information about the Mono-winforms-list mailing list