[Mono-bugs] [Bug 82674][Blo] New - Localizable form with bitmap crashes on startup

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Sep 3 06:37:19 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 mark.lambert at nonlinear.com.

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

--- shadow/82674	2007-09-03 06:37:19.000000000 -0400
+++ shadow/82674.tmp.22292	2007-09-03 06:37:19.000000000 -0400
@@ -0,0 +1,65 @@
+Bug#: 82674
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: XP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: mark.lambert at nonlinear.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Localizable form with bitmap crashes on startup
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+A Windows Form with Localizable resources throws an exception if the 
+resources contain an object of type System.Drawing.Bitmap to be assigned 
+to a property of type System.Drawing.Image.
+The call stack (and reflector) suggest that the problem is a check for 
+Type equality rather than inheritance. 
+
+Steps to reproduce the problem:
+1. Use Visual Studio to create a form with Localizable set to true 
+2. Set the BackgroundImage property to be a bitmap
+3. Run the built app under mono
+
+Actual Results:
+Unhandled Exception: System.InvalidCastException: Value is not a 
+convertible object: System.Drawing.Bitmap to System.Drawing.Image
+
+  at System.Convert.ToType (System.Object value, System.Type 
+conversionType, IFormatProvider provider) [0x0022b] in 
+C:\cygwin\tmp\monobuild\build\BUILD\mono-1.2.5
+\mcs\class\corlib\System\Convert.cs:2920 
+
+  at System.Convert.ChangeType (System.Object value, System.Type 
+conversionType) [0x00041] in C:\cygwin\tmp\monobuild\build\BUILD\mono-
+1.2.5\mcs\class\corlib\System\Convert.cs:2481 
+
+  at System.ComponentModel.ComponentResourceManager.ApplyResources 
+(System.Object value, System.String objectName, 
+System.Globalization.CultureInfo culture) [0x0007f] in 
+C:\cygwin\tmp\monobuild\build\BUILD\mono-1.2.5
+\mcs\class\System\System.ComponentModel\ComponentResourceManager.cs:76 
+
+  at System.ComponentModel.ComponentResourceManager.ApplyResources 
+(System.Object value, System.String objectName) [0x00000] in 
+C:\cygwin\tmp\monobuild\build\BUILD\mono-1.2.5
+\mcs\class\System\System.ComponentModel\ComponentResourceManager.cs:54 
+
+
+Expected Results:
+A form with a bitmap on it
+
+How often does this happen? 
+Every time
+
+Additional Information:
+I will try to attach a zip with a simple repro case.


More information about the mono-bugs mailing list