[Mono-bugs] [Bug 357883] New: Can't create registry key on 1st attempt

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 1 01:31:50 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=357883


           Summary: Can't create registry key on 1st attempt
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: i586
        OS/Version: SLED 10
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: twiest at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Component Test


Description of Problem:
When SharpChess runs for the first time, it tries to create a registry key and
crashes with the output shown below. If you run SharpChess a 2nd time, then
everything works fine.

This fails in Mono 1.9.0p1+ and 1.2.6. I couldn't test it on 1.2.2 because it
crashes because of a completely different reason.


Steps to reproduce the problem:
1. rm -rf ~/.mono
2. run SharpChess
3. Notice the error as shown below
4. run SharpChess again
5. Notice it ran fine the 2nd time


Actual Results:
c212:~ # SharpChess

Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for SharpChess.Game --->
System.UnauthorizedAccessException: Cannot write to the registry key.
  at Microsoft.Win32.RegistryKey.CreateSubKey (System.String subkey) [0x0004c]
in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:289
  at (wrapper remoting-invoke-with-check)
Microsoft.Win32.RegistryKey:CreateSubKey (string)
  at SharpChess.Game..cctor () [0x0006e] in
/usr/src/packages/BUILD/wf-apps-r573/SharpChess/SharpChess-Port/SharpChess/Game.cs:39
--- End of inner exception stack trace ---

  at SharpChess.frmMain.frmMain_Load (System.Object sender, System.EventArgs e)
[0x00000] in
/usr/src/packages/BUILD/wf-apps-r573/SharpChess/SharpChess-Port/SharpChess/frmMain.cs:970
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00022] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2094
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00023] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2873
  at System.Windows.Forms.Form.OnCreateControl () [0x00027] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2037
  at System.Windows.Forms.Control.CreateControl () [0x000bf] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:3731
  at System.Windows.Forms.Control.WmShowWindow (System.Windows.Forms.Message&
m) [0x00036] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5627
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x001dc] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5219
  at System.Windows.Forms.ScrollableControl.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs:797
  at System.Windows.Forms.ContainerControl.WndProc
(System.Windows.Forms.Message& m) [0x0003d] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs:589
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m)
[0x00119] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2541
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:225
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:206
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x0006a] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:188
  at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg message,
IntPtr wParam, IntPtr lParam) [0x0008d] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:4895
  at System.Windows.Forms.XplatUIX11.MapWindow (System.Windows.Forms.Hwnd hwnd,
WindowType windows) [0x0003c] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:1435
  at System.Windows.Forms.XplatUIX11.CreateWindow
(System.Windows.Forms.CreateParams cp) [0x00569] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:2723
  at System.Windows.Forms.XplatUI.CreateWindow
(System.Windows.Forms.CreateParams cp) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:475
  at System.Windows.Forms.NativeWindow.CreateHandle
(System.Windows.Forms.CreateParams create_params) [0x0000c] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:112
  at System.Windows.Forms.Control.CreateHandle () [0x0003f] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4375
  at System.Windows.Forms.Form.CreateHandle () [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:1930
  at System.Windows.Forms.Control.CreateControl () [0x00044] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:3711
  at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x0003e] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4923
  at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x00071] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2398
  at System.Windows.Forms.Control.set_Visible (Boolean value) [0x0000c] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:3377
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:set_Visible (bool)
  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00059] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:736
  at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:635
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000] in
/tmp/monobuild/build/BUILD/mono-1.9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:623
  at SharpChess.frmMain.Main () [0x00000] in
/usr/src/packages/BUILD/wf-apps-r573/SharpChess/SharpChess-Port/SharpChess/frmMain.cs:929
c212:~ #


Expected Results:
SharpChess should start up.


How often does this happen? 
Every time.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list