scaladotnet
scaladotnet copied to clipboard
scalacompiler.exe runtime error with mono 2.10.8
In trying to run the scalacompiler.exe with Mono 2.10.8 (running on Windows 7/8 & Ubuntu) I received this error:
mono scalacompiler.exe
===============================================> (Start of Error Message)
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for scala.tools.nsc.Main$ ---> System.TypeInitializationException: An exception was thrown by the type initializer for scala.tools.nsc.Properties$ ---> System.TypeInitializationException: An exception was thrown by the type initializer for scala.Predef$ ---> System.TypeInitializationException: An exception was thrown by the type initializer for scala.package$ ---> System.TypeInitializationException: An exception was thrown by the type initializer for scala.collection.Traversable$ ---> System.TypeInitializationException: An exception was thrown by the type initializer for java.lang.Throwable ---> System.TypeInitializationException: An exception was thrown by the type initializer for Object ---> System.TypeLoadException: A type load exception has occurred.
at IKVM.Internal.ClassLoaderWrapper.LoadClassCritical (System.String name) [0x00000] in
at IKVM.Internal.CoreClasses+java+lang+Object..cctor () [0x00000] in
--- End of inner exception stack trace ---
at IKVM.Internal.CompiledTypeWrapper.GetBaseTypeWrapper (System.Type type) [0x00000] in
at IKVM.Internal.CompiledTypeWrapper..ctor (System.String name, System.Type type) [0x00000] in
at IKVM.Internal.CompiledTypeWrapper+CompiledRemappedTypeWrapper..ctor (System.String name, System.Type type) [0x00000] in
at IKVM.Internal.CompiledTypeWrapper.newInstance (System.String name, System.Type type) [0x00000] in
at IKVM.Internal.AssemblyClassLoader+AssemblyLoader.CreateWrapperForAssemblyType (System.Type type) [0x00000] in
at IKVM.Internal.AssemblyClassLoader.GetWrapperFromAssemblyType (System.Type type) [0x00000] in
at IKVM.Internal.BootstrapClassLoader.GetWrapperFromAssemblyType (System.Type type) [0x00000] in
at IKVM.Internal.ClassLoaderWrapper.GetWrapperFromType (System.Type type) [0x00000] in
at IKVM.NativeCode.ikvm.runtime.Util.getFriendlyClassFromType (System.Type type) [0x00000] in
at ikvm.runtime.Util.getFriendlyClassFromType (System.Type t) [0x00000] in
at java.lang.Class.op_Implicit (System.Type type) [0x00000] in
at IKVM.Internal.ExceptionHelper.getPersistentFields () [0x00000] in
at java.lang.Throwable..cctor () [0x00000] in
--- End of inner exception stack trace ---
at scala.util.control.BreakControl..ctor () [0x00000] in
at scala.util.control.Breaks..ctor () [0x00000] in
at scala.collection.Traversable$..ctor () [0x00000] in
at scala.collection.Traversable$..cctor () [0x00000] in
--- End of inner exception stack trace ---
at scala.package$..ctor () [0x00000] in
at scala.package$..cctor () [0x00000] in
--- End of inner exception stack trace ---
at scala.Predef$..ctor () [0x00000] in
at scala.Predef$..cctor () [0x00000] in
--- End of inner exception stack trace ---
at scala.tools.nsc.Properties$.pickJarBasedOn () [0x00000] in
at scala.util.PropertiesTrait$class.scalaProps (PropertiesTrait $this) [0x00000] in
at scala.tools.nsc.Properties$.scalaProps () [0x00000] in
--- End of inner exception stack trace ---
at scala.tools.nsc.Driver..ctor () [0x00000] in
at scala.tools.nsc.Main$..ctor () [0x00000] in
at scala.tools.nsc.Main$..cctor () [0x00000] in
--- End of inner exception stack trace ---
at <Module>.Main (System.String[] args) [0x00000] in
at IKVM.Internal.ClassLoaderWrapper.LoadClassCritical (System.String name) [0x00000] in
at IKVM.Internal.CoreClasses+java+lang+Object..cctor () [0x00000] in
--- End of inner exception stack trace ---
at IKVM.Internal.CompiledTypeWrapper.GetBaseTypeWrapper (System.Type type) [0x00000] in
at IKVM.Internal.CompiledTypeWrapper..ctor (System.String name, System.Type type) [0x00000] in
at IKVM.Internal.CompiledTypeWrapper+CompiledRemappedTypeWrapper..ctor (System.String name, System.Type type) [0x00000] in
at IKVM.Internal.CompiledTypeWrapper.newInstance (System.String name, System.Type type) [0x00000] in
at IKVM.Internal.AssemblyClassLoader+AssemblyLoader.CreateWrapperForAssemblyType (System.Type type) [0x00000] in
at IKVM.Internal.AssemblyClassLoader.GetWrapperFromAssemblyType (System.Type type) [0x00000] in
at IKVM.Internal.BootstrapClassLoader.GetWrapperFromAssemblyType (System.Type type) [0x00000] in
at IKVM.Internal.ClassLoaderWrapper.GetWrapperFromType (System.Type type) [0x00000] in
at IKVM.NativeCode.ikvm.runtime.Util.getFriendlyClassFromType (System.Type type) [0x00000] in
at ikvm.runtime.Util.getFriendlyClassFromType (System.Type t) [0x00000] in
at java.lang.Class.op_Implicit (System.Type type) [0x00000] in
at IKVM.Internal.ExceptionHelper.getPersistentFields () [0x00000] in
at java.lang.Throwable..cctor () [0x00000] in
--- End of inner exception stack trace ---
at scala.util.control.BreakControl..ctor () [0x00000] in
at scala.util.control.Breaks..ctor () [0x00000] in
at scala.collection.Traversable$..ctor () [0x00000] in
at scala.collection.Traversable$..cctor () [0x00000] in
--- End of inner exception stack trace ---
at scala.package$..ctor () [0x00000] in
at scala.package$..cctor () [0x00000] in
--- End of inner exception stack trace ---
at scala.Predef$..ctor () [0x00000] in
at scala.Predef$..cctor () [0x00000] in
--- End of inner exception stack trace ---
at scala.tools.nsc.Properties$.pickJarBasedOn () [0x00000] in
at scala.util.PropertiesTrait$class.scalaProps (PropertiesTrait $this) [0x00000] in
at scala.tools.nsc.Properties$.scalaProps () [0x00000] in
--- End of inner exception stack trace ---
at scala.tools.nsc.Driver..ctor () [0x00000] in
at scala.tools.nsc.Main$..ctor () [0x00000] in
at scala.tools.nsc.Main$..cctor () [0x00000] in
--- End of inner exception stack trace ---
at <Module>.Main (System.String[] args) [0x00000] in
===============================================> (End of Error Message)
Robert,
Due to lack of manpower we're testing Scala.NET only on Windows OSes.
For example, there's at least one area where a Windows-only API is being used (line 742 at [1]):
val typ =
if (fieldInfo.FieldType.IsEnum) {
// now comes a .NET 4.0 API call, and UnderlyingSystemType doesn't do the trick. Can another (old) API be used instead?
fieldInfo.FieldType.GetEnumUnderlyingType
} else {
fieldInfo.FieldType
}
That's how it looks for the time being.
Miguel
[1] https://github.com/magarciaEPFL/scaladotnet/blob/master/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
I am using mono 2.10.9 on a Mac, and got the same error.
is this fixed now?