[Mono-bugs] [Bug 81835][Maj] New - crash if embedded icons are used

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jun 9 09:12:45 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by olaf.krause at ok-edv.de.

http://bugzilla.ximian.com/show_bug.cgi?id=81835

--- shadow/81835	2007-06-09 09:12:45.000000000 -0400
+++ shadow/81835.tmp.9880	2007-06-09 09:12:45.000000000 -0400
@@ -0,0 +1,103 @@
+Bug#: 81835
+Product: Mono: Runtime
+Version: 1.2
+OS: 
+OS Details: CentOS 5
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: olaf.krause at ok-edv.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: crash if embedded icons are used
+
+Description of Problem:
+I ported my app from MS to mono. It compiles now, but as soon as icons of
+winforms should be loaded I get an Argument exception
+
+Steps to reproduce the problem:
+1. Build a winforms app on windows (VS2005) with an userdefined icon
+VS generates code like 
+this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 
+to load the icon.
+2. Try to compile and run it under mono 1.2.4
+3. Try to open the form with the user defined icon within the resource
+
+Actual Results:
+Unhandled Exception: System.Reflection.TargetInvocationException: Exception
+has been thrown by the target of an invocation. --->
+System.ArgumentException: Stream is not a valid .resources file,
+magic=0x6d783f3c
+  at System.Resources.ResourceReader.ReadHeaders () [0x00017] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Resources/ResourceReader.cs:119
+
+  at System.Resources.ResourceReader..ctor (System.IO.Stream stream) [0x00000] 
+  at System.Resources.ResourceSet..ctor (System.IO.Stream stream) [0x00000] 
+  at <0x00000> <unknown method>
+  at (wrapper managed-to-native)
+System.Reflection.MonoCMethod:InternalInvoke (object,object[])
+  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
+invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
+System.Globalization.CultureInfo culture) [0x00040] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Reflection/MonoMethod.cs:381
+--- End of inner exception stack trace ---
+
+  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
+invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
+System.Globalization.CultureInfo culture) [0x00065] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Reflection/MonoMethod.cs:387
+
+  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr,
+System.Reflection.Binder binder, System.Object[] parameters,
+System.Globalization.CultureInfo culture) [0x00000] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Reflection/MonoMethod.cs:392
+
+  at System.Activator.CreateInstance (System.Type type, BindingFlags
+bindingAttr, System.Reflection.Binder binder, System.Object[] args,
+System.Globalization.CultureInfo culture, System.Object[]
+activationAttributes) [0x00144] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System/Activator.cs:234 
+  at System.Activator.CreateInstance (System.Type type, System.Object[]
+args, System.Object[] activationAttributes) [0x00000] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System/Activator.cs:175 
+  at System.Activator.CreateInstance (System.Type type, System.Object[]
+args) [0x00000] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System/Activator.cs:170 
+  at System.Resources.ResourceManager.InternalGetResourceSet
+(System.Globalization.CultureInfo culture, Boolean Createifnotexists,
+Boolean tryParents) [0x000f4] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Resources/ResourceManager.cs:332
+
+  at System.Resources.ResourceManager.InternalGetResourceSet
+(System.Globalization.CultureInfo culture, Boolean Createifnotexists,
+Boolean tryParents) [0x001f3] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Resources/ResourceManager.cs:370
+
+  at System.Resources.ResourceManager.InternalGetResourceSet
+(System.Globalization.CultureInfo culture, Boolean Createifnotexists,
+Boolean tryParents) [0x001f3] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Resources/ResourceManager.cs:370
+
+  at System.Resources.ResourceManager.GetObject (System.String name,
+System.Globalization.CultureInfo culture) [0x00027] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Resources/ResourceManager.cs:179
+
+  at System.Resources.ResourceManager.GetObject (System.String name)
+[0x00000] in
+/tmp/scratch/BUILD/mono-1.2.4/mcs/class/corlib/System.Resources/ResourceManager.cs:165
+
+  at OkEdv.DBManager.Dialogs.MainWindow.InitializeComponent () [0x005f0] in
+/home/RESEARCH/olaf.krause/msnet/trunk/DBManager/Dialogs/MainWindow.cs:530 
+
+Expected Results:
+Icon should be loaded
+
+How often does this happen? 
+everytime
+
+Additional Information:


More information about the mono-bugs mailing list