[Mono-dev] mono 1.1.14 WIN32 runtime error

Peter Dennis Bartok peter at novonyx.com
Tue Apr 4 18:48:38 EDT 2006


Already logged here:
http://bugzilla.ximian.com/show_bug.cgi?id=77896

Many people are running into this. Seems to pretty much render Winforms 
useless on Win32. Waiting for Paolo on that one.

Cheers,
 Peter

-----Original Message-----
From: "Duane Wandless" <duane at wandless.net>
To: <Mono-devel-list at lists.ximian.com>
Date: 04 April, 2006 16:37
Subject: [Mono-dev] mono 1.1.14 WIN32 runtime error


First thanks for reading... then thanks for helping if you can!

Trying to run a simple System.Windows.Forms app (see very bottom for code)
gives this:
$ which gdiplus.dll
/cygdrive/c/WINDOWS/system32/gdiplus.dll

$ MONO_DEBUG_LEVEL=debug mono test.exe

Mono-INFO: DllImport attempting to load: 'gdiplus.dll'.
Mono-INFO: DllImport loading location: 'gdiplus.dll'.
Mono-INFO: Searching for 'GdipLoadImageFromDelegate_linux'.
Mono-INFO: Probing 'GdipLoadImageFromDelegate_linux'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 28'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 4'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 8'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 12'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 16'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 20'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 24'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 28'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 32'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 36'.
Mono-INFO: Probing '_GdipLoadImageFromDelegate_linux at 40'.

<<<<<<<<<<<<< this continues for awhile

Unhandled Exception: System.TypeInitializationException: An exception
was thrown by the type initializer for System.Windows.Forms.Form --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.InvalidProgramException:
Invalid IL code in (wrapper managed-to-native)
System.Drawing.GDIPlus:GdipLoadImageFromStream
(System.Runtime.InteropServices.UCOMIStream,intptr&): IL_0010: call
  0x00000002
in <0x00000> <unknown method>
in <0x001d3> System.Drawing.Image:InitFromStream (System.IO.Stream stream)
in <0x000fb> System.Drawing.Bitmap:.ctor
(System.Runtime.Serialization.SerializationInfo info, StreamingContext
context)
in <0x00000> <unknown method>
in (wrapper managed-to-native)
System.Reflection.MonoCMethod:InternalInvoke (object,object[])
in <0x0008d> 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 <0x0010e> System.Reflection.MonoCMethod:Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
in <0x0001a> System.Reflection.MethodBase:Invoke (System.Object obj,
System.Object[] parameters)
in <0x001db> System.Runtime.Serialization.ObjectRecord:LoadData
(System.Runtime.Serialization.ObjectManager manager,
ISurrogateSelector selector, StreamingContext context)
in <0x00110> System.Runtime.Serialization.ObjectManager:DoFixups ()
in <0x00042> 
System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadNextObject
(System.IO.BinaryReader reader)
in <0x000a3> 
System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadObjectGraph
(System.IO.BinaryReader reader, Boolean readHeaders, System.Object
result, System.Runtime.Remoting.Messaging.Header[] headers)
in <0x0011f> 
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:NoCheckDeserialize
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler)
in <0x0000f> 
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Deserialize
(System.IO.Stream serializationStream)
in <0x00032> System.Resources.ResourceReader:ReadNonPredefinedValue
(System.Type exp_type)
in <0x0031e> System.Resources.ResourceReader:ReadValueVer1 (System.Type 
type)
in <0x00163> System.Resources.ResourceReader:ResourceValue (Int32 index)
in <0x00028> System.Resources.ResourceReader+ResourceEnumerator:get_Value ()
in <0x0007e> System.Resources.ResourceSet:ReadResources ()
in <0x00049> System.Resources.ResourceSet:GetObject (System.String
name, Boolean ignoreCase)
in <0x0007a> System.Resources.ResourceManager:GetObject (System.String
name, System.Globalization.CultureInfo culture)
in <0x00010> System.Resources.ResourceManager:GetObject (System.String name)
in <0x00017> System.Windows.Forms.Locale:GetResource (System.String name)
in <0x00011> System.Windows.Forms.Form:.cctor ()--- End of inner
exception stack trace ---

in <0x00000> <unknown method>
in <0x0000b> WindowsApplication1.Form1:.ctor ()
in (wrapper remoting-invoke-with-check) WindowsApplication1.Form1:.ctor ()
in <0x00018> WindowsApplication1.Program:Main ()

===============================source code
using System;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
        }
    }

        static class Program
        {
            /// <summary>
            /// The main entry point for the application.
            /// </summary>
            static void Main()
            {
                Application.Run(new Form1());
            }
        }
}




More information about the Mono-devel-list mailing list