Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.TypeInitializationException IronPython2 #829

Open
3 tasks done
Ranbir-Sinha opened this issue Feb 18, 2023 · 1 comment
Open
3 tasks done

System.TypeInitializationException IronPython2 #829

Ranbir-Sinha opened this issue Feb 18, 2023 · 1 comment
Labels

Comments

@Ranbir-Sinha
Copy link

Ranbir-Sinha commented Feb 18, 2023

Prerequisites

The issue tracker is used to report bugs and request new features, NOT to ask questions.

Questions should be posted to the users mailing list which can be accessed at
https://ironpython.groups.io/g/users.

  • Are you running the latest version? Yes
  • Are you reporting to the correct repository? Yes
  • Did you perform a cursory search? Yes

Description

$ mono IronPython.2.7.12/net45/ipy.exe

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Microsoft.Scripting.Hosting.Configuration.Section' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ComponentModel.TypeDescriptor' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: System.Native assembly: type: member:(null)
at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
at Interop+Sys..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at Interop.GetRandomBytes (System.Byte* buffer, System.Int32 length) [0x00000] in :0
at System.Guid.NewGuid () [0x00000] in :0
at System.ComponentModel.TypeDescriptor..cctor () [0x00034] in :0
--- End of inner exception stack trace ---
at System.Configuration.ConfigurationProperty..ctor (System.String name, System.Type type, System.Object defaultValue) [0x00000] in <040d151eff354af185a19bdffe022106>:0
at Microsoft.Scripting.Hosting.Configuration.Section..cctor () [0x0000f] in <6c73c743798547f998a008888ceecf5e>:0
--- End of inner exception stack trace ---
at Microsoft.Scripting.Hosting.ScriptRuntimeSetup.LoadRuntimeSetupImpl (Microsoft.Scripting.Hosting.ScriptRuntimeSetup setup, System.IO.Stream configFileStream) [0x00000] in <6c73c743798547f998a008888ceecf5e>:0
at Microsoft.Scripting.Hosting.ScriptRuntimeSetup.LoadRuntimeSetup (Microsoft.Scripting.Hosting.ScriptRuntimeSetup setup, System.IO.Stream configFileStream) [0x00000] in <6c73c743798547f998a008888ceecf5e>:0
at Microsoft.Scripting.Hosting.ScriptRuntimeSetup.ReadConfiguration () [0x00005] in <6c73c743798547f998a008888ceecf5e>:0
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.CreateRuntimeSetup () [0x00006] in :0
at PythonConsoleHost.CreateRuntimeSetup () [0x00000] in <38d0e7657a834c008b1272953edeadc5>:0
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.Run (System.String[] args) [0x00000] in :0
at PythonConsoleHost.Main (System.String[] args) [0x00020] in <38d0e7657a834c008b1272953edeadc5>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Microsoft.Scripting.Hosting.Configuration.Section' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ComponentModel.TypeDescriptor' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: System.Native assembly: type: member:(null)
at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
at Interop+Sys..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at Interop.GetRandomBytes (System.Byte* buffer, System.Int32 length) [0x00000] in :0
at System.Guid.NewGuid () [0x00000] in :0
at System.ComponentModel.TypeDescriptor..cctor () [0x00034] in :0
--- End of inner exception stack trace ---
at System.Configuration.ConfigurationProperty..ctor (System.String name, System.Type type, System.Object defaultValue) [0x00000] in <040d151eff354af185a19bdffe022106>:0
at Microsoft.Scripting.Hosting.Configuration.Section..cctor () [0x0000f] in <6c73c743798547f998a008888ceecf5e>:0
--- End of inner exception stack trace ---
at Microsoft.Scripting.Hosting.ScriptRuntimeSetup.LoadRuntimeSetupImpl (Microsoft.Scripting.Hosting.ScriptRuntimeSetup setup, System.IO.Stream configFileStream) [0x00000] in <6c73c743798547f998a008888ceecf5e>:0
at Microsoft.Scripting.Hosting.ScriptRuntimeSetup.LoadRuntimeSetup (Microsoft.Scripting.Hosting.ScriptRuntimeSetup setup, System.IO.Stream configFileStream) [0x00000] in <6c73c743798547f998a008888ceecf5e>:0
at Microsoft.Scripting.Hosting.ScriptRuntimeSetup.ReadConfiguration () [0x00005] in <6c73c743798547f998a008888ceecf5e>:0
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.CreateRuntimeSetup () [0x00006] in :0
at PythonConsoleHost.CreateRuntimeSetup () [0x00000] in <38d0e7657a834c008b1272953edeadc5>:0
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.Run (System.String[] args) [0x00000] in :0
at PythonConsoleHost.Main (System.String[] args) [0x00020] in <38d0e7657a834c008b1272953edeadc5>:0

Steps to Reproduce

  1. Download and unzip IronPython2 on RHEL8 system
  2. Install mono and dotnet on RHEL8
  3. mono IronPython.2.7.12/net45/ipy.exe

Expected behavior: IronPython Console shows up

Actual behavior: Crash observed

Versions

2.7.12

You can get this information from executing ipy -V.

@slozier slozier added the mono label Feb 26, 2023
@slozier
Copy link
Contributor

slozier commented Feb 26, 2023

What version of Mono are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants