[Mono-list] Winform App Failure

Peter Dennis Bartok peter@novonyx.com
Wed, 20 Apr 2005 21:06:03 -0600


Can you give some details as to what it is you're doing (API call)? And 
maybe some details on the version of Mono you're using.
It's not the swf.dll that's the problem in this case, the failure is most 
likely in System.Drawing (or libgdiplus).

Are you using packages or did you build mono from source? If you built from 
source, did libgdiplus 'configure' properly detect your png library? (when 
it completes it prints what image libraries it detected and will enable 
support for).

Can you check if the picture works when used directly from disk and only 
fails when used as an embedded resource?

And ultimately, if everything else checks out, can you create a little test 
app that uses the picture that's failing and log a bug? Or, if you don't 
have the original source, can you attach the app (or provide a means to get 
it to reproduce and fix the bug)?


PS: Winforms has it's own mailing list at mono-winforms-list@ximian.com , 
for real winforms problems (this I don't think is one) you might find a 
better audience there.

-----Original Message-----
From: "Alex James" <alex00james@adelphia.net>
To: <mono-list@lists.ximian.com>
Date: 20 April, 2005 18:07
Subject: [Mono-list] Winform App Failure

>To all:
>I am getting this error when trying to run my winform app.  The app will
>seem to appear for a moment and then crash with this error:
>The images used in the form were originally of .png format ... but I
>believe that they were turned into resource files (on Windows) before
>they were compiled.
>Just for notes; I have libpng v1.2.8 installed and I am trying to run
>this on a debian (ubuntu) system.  It should also be noted that I tried
>to replace the existing System.Windows.Forms.dll with the one on
>http://svn.myrealbox.com/blog/ but I can't tell if it is using it or not.
>Any help would be great!
>Mono System.Windows.Forms Assembly [Revision: 41928; built: 2005/2/18
>Keyboard: United States keyboard layout (phantom key version)
>Unhandled Exception: System.Reflection.TargetInvocationException:
>Exception has been thrown by the target of an invocation. --->
>System.NotSupportedException: Either image format is unknown or you
>don't have the required libraries for this format.
>in <0x0016e> System.Drawing.GDIPlus:CheckStatus (Status status)
>in <0x000cd> System.Drawing.Image:InitFromStream (System.IO.Stream stream)
>in (wrapper remoting-invoke-with-check)
>System.Drawing.Image:InitFromStream (System.IO.Stream)
>in <0x00104> System.Drawing.Bitmap:.ctor
>(System.Runtime.Serialization.SerializationInfo info, StreamingContext
>in <0x00000> <unknown method>
>in (wrapper managed-to-native)
>System.Reflection.MonoCMethod:InternalInvoke (object,object[])
>in <0x0006f> System.Reflection.MonoCMethod:Invoke (System.Object obj,
>BindingFlags invokeAttr, System.Reflection.Binder binder,
>System.Object[] parameters, System.Globalization.CultureInfo culture)--- 
>End of inner exception stack trace ---
>in <0x00107> System.Reflection.MonoCMethod:Invoke (System.Object obj,
>BindingFlags invokeAttr, System.Reflection.Binder binder,
>System.Object[] parameters, System.Globalization.CultureInfo culture)
>in <0x00017> System.Reflection.MethodBase:Invoke (System.Object obj,
>System.Object[] parameters)
>in <0x0021d> System.Runtime.Serialization.ObjectRecord:LoadData
>(System.Runtime.Serialization.ObjectManager manager, ISurrogateSelector
>selector, StreamingContext context)
>in <0x00104> System.Runtime.Serialization.ObjectManager:DoFixups ()
>in <0x0003f>
>(System.IO.BinaryReader reader)
>in <0x000b0>
>(System.IO.BinaryReader reader, Boolean readHeaders, System.Object
>result, System.Runtime.Remoting.Messaging.Header[] headers)
>in <0x00126>
>(System.IO.Stream serializationStream,
>System.Runtime.Remoting.Messaging.HeaderHandler handler)
>in <0x00012>
>(System.IO.Stream serializationStream)
>in <0x0052b> System.Resources.ResourceReader:ResourceValue (Int32 index)
>in <0x00023> System.Resources.ResourceReader+ResourceEnumerator:get_Value 
>in <0x00090> System.Resources.ResourceSet:ReadResources ()
>in <0x00039> System.Resources.ResourceSet:GetObject (System.String name,
>Boolean ignoreCase)
>in <0x00081> System.Resources.ResourceManager:GetObject (System.String
>name, System.Globalization.CultureInfo culture)
>in <0x00010> System.Resources.ResourceManager:GetObject (System.String 
>in <0x00509> iControlWin.mainForm:InitializeComponent ()
>in <0x000fa> iControlWin.mainForm:.ctor ()
>in (wrapper remoting-invoke-with-check) iControlWin.mainForm:.ctor ()
>in <0x0001a> iControlWin.mainForm:Main ()
>Mono-list maillist  -  Mono-list@lists.ximian.com