[Mono-bugs] [Bug 75039][Nor] New - TypeInitializationException is
thrown during call of MessageBox
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed May 25 07:00:50 EDT 2005
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 ich at burnsystems.de.
http://bugzilla.ximian.com/show_bug.cgi?id=75039
--- shadow/75039 2005-05-25 07:00:50.000000000 -0400
+++ shadow/75039.tmp.24689 2005-05-25 07:00:50.000000000 -0400
@@ -0,0 +1,116 @@
+Bug#: 75039
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details: Gentoo 2005.0 2.6.11.10
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: ich at burnsystems.de
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: TypeInitializationException is thrown during call of MessageBox
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+During call of
+
+private void OnGameStateChange ( Game.GameState m_GameState )
+{
+ switch ( m_GameState )
+ {
+ case Game.GameState.CircleWon:
+ MessageBox.Show ( this, "Kreis hat gewonnen" );
+ break;
+....
+ }
+...
+}
+
+I get the appended exception. With Mono 1.1.5 on Windows and Linux
+everything works perfect. When I reinstalled Linux and Mono 1.1.7 I get
+this error. On MS.Net no exception is thrown.
+
+Unhandled Exception: System.TypeInitializationException: An exception was
+thrown by the type initializer for MessageBoxForm --->
+System.InvalidCastException: Cannot cast from source type to destination
+type.
+in <0x0005b> System.Windows.Forms.MessageBox+MessageBoxForm:.cctor ()---
+End of inner exception stack trace ---
+
+in <0x00000> <unknown method>
+in <0x00031> System.Windows.Forms.MessageBox:Show (IWin32Window owner,
+System.String text)
+in <0x0002d> BurnSystems.TicTacToe.MainForm:OnGameStateChange (GameState
+m_GameState)
+in (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void_Game/GameState
+(BurnSystems.TicTacToe.Game/GameState)
+in <0x00058> BurnSystems.TicTacToe.Game:PublishWinLossDraw (Boolean bDraw,
+FieldType eFieldType)
+....
+in <0x0011b> System.Windows.Forms.NativeWindow:WndProc (IntPtr hWnd, Msg
+msg, IntPtr wParam, IntPtr lParam)
+in <0x00016> System.Windows.Forms.XplatUIX11:DispatchMessage
+(System.Windows.Forms.MSG msg)
+in <0x00015> System.Windows.Forms.XplatUI:DispatchMessage
+(System.Windows.Forms.MSG msg)
+in <0x001fa> System.Windows.Forms.Application:Run ()
+in <0x000a8> System.Windows.Forms.Application:Run
+(System.Windows.Forms.ApplicationContext context)
+in <0x0002e> System.Windows.Forms.Application:Run
+(System.Windows.Forms.Form mainForm)
+in <0x00021> BurnSystems.TicTacToe.MainForm:Main ()
+
+
+Steps to reproduce the problem:
+1. Call MessageBox
+
+Actual Results:
+
+Exception is thrown
+
+Expected Results:
+
+MessageBox should be shown
+
+How often does this happen?
+
+Everytime.
+
+
+Steps to reproduce
+
+using System;
+using System.Windows.Forms;
+
+namespace A
+{
+ class Trula
+ {
+ public static void Main ( String [] astrArguments )
+ {
+ MessageBox.Show ( "Test" );
+ }
+ }
+}
+
+=>
+
+Unhandled Exception: System.TypeInitializationException: An exception was
+thrown by the type initializer for MessageBoxForm --->
+System.InvalidCastException: Cannot cast from source type to destination
+type.
+in <0x0005b> System.Windows.Forms.MessageBox+MessageBoxForm:.cctor ()---
+End of inner exception stack trace ---
+
+in <0x00000> <unknown method>
+in <0x0002c> System.Windows.Forms.MessageBox:Show (System.String text)
+in <0x0000c> A.Trula:Main (System.String[] astrArguments)
More information about the mono-bugs
mailing list