zzattack / ccmaps-net

Maps renderer for several Command & Conquer games
GNU General Public License v3.0
58 stars 25 forks source link

CNCMaps GUI tries to access Win32 registry on Linux with Mono #1

Closed Mailaender closed 11 years ago

Mailaender commented 11 years ago
System.Security.SecurityException: No access to the given key
  at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, Boolean is_volatile) [0x00057] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:138 
  at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x00000] in <filename unknown>:0 
  at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, Boolean createNonExisting) [0x000c8] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:411 
  at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, Boolean writable) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:842 
  at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name, Boolean writable) [0x0001e] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:278 
  at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:262 
  at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
  at CNCMaps.GUI.MainForm.FindRenderProg () [0x00000] in /home/matthias/Projekte/ccmaps-net/CNCMaps GUI/MainForm.cs:27 
  at CNCMaps.GUI.MainForm.MainFormLoad (System.Object sender, System.EventArgs e) [0x00000] in /home/matthias/Projekte/ccmaps-net/CNCMaps GUI/MainForm.cs:19 
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00022] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2179 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00029] in /home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:3010 
zzattack commented 11 years ago

The GUI isn't really supported on Linux, but with the --mixdir argument there should be no registry accessing in the commandline tool I'll see if the GUI tool can be updated.

zzattack commented 11 years ago

https://github.com/zzattack/ccmaps-net/commit/648a20994c24d27d54430a95c380b88e4e852658

Mailaender commented 11 years ago

strange I updated to commit fc466ae and still get

System.Security.SecurityException: No access to the given key ---> System.UnauthorizedAccessException: Access to the path "/etc/mono/registry" is denied.
  at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0006c] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:116 
  at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:80 
  at System.IO.DirectoryInfo.Create () [0x00000] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/System.IO/DirectoryInfo.cs:141 
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
  at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00039] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:98 
  at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:80 
  at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, Boolean is_volatile) [0x0004a] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:136 
  --- End of inner exception stack trace ---
  at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, Boolean is_volatile) [0x00057] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:138 
  at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:116 
  at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, Boolean createNonExisting) [0x000c4] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:411 
  at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, Boolean writable) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:835 
  at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name, Boolean writable) [0x0001e] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:278 
  at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name) [0x00000] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:262 
  at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
  at CNCMaps.GUI.MainForm.GetMixDir () [0x0000c] in /home/matthias/Projekte/ccmaps-net/CNCMaps GUI/MainForm.cs:131 
  at CNCMaps.GUI.MainForm.MainFormLoad (System.Object sender, System.EventArgs e) [0x00018] in /home/matthias/Projekte/ccmaps-net/CNCMaps GUI/MainForm.cs:21 
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00022] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2077 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00029] in /home/abuild/rpmbuild/BUILD/mono-3.2.0/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2895 
Mailaender commented 11 years ago

Seems to be gone now.