Google Guice 4.1.0 - Error when binding interfaces with default methods
Brought to you by:
jfrijters
Binding an interface that also contains default methods leads to a crash in the native code.
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.RuntimeType.GetInterfaceMapData (System.Type,System.Type,System.Reflection.MethodInfo[]&,System.Reflection.MethodInfo[]&) <0x0006a>
at System.RuntimeType.GetInterfaceMap (System.Type) <0x00101>
at IKVM.Internal.DotNetTypeWrapper.LazyPublishMembers () <0x01255>
at IKVM.Internal.TypeWrapper.LazyPublishMethods () <0x00013>
at IKVM.Internal.TypeWrapper.GetMethods () <0x0005c>
at Java_java_lang_Class.getDeclaredConstructors0 (java.lang.Class,bool) <0x0014f>
at java.lang.Class.getDeclaredConstructors0 (bool) <0x00017>
at java.lang.Class.privateGetDeclaredConstructors (bool) <0x000e3>
at java.lang.Class.getDeclaredConstructors (ikvm.internal.CallerID) <0x00043>
at com.google.inject.spi.InjectionPoint.forConstructorOf (com.google.inject.TypeLiteral) <0x0016b>
at com.google.inject.internal.ConstructorBindingImpl.create (com.google.inject.internal.InjectorImpl,com.google.inject.Key,com.google.inject.spi.InjectionPoint,object,com.google.inject.internal.Scoping,com.google.inject.internal.Errors,bool,bool) <0x0014f>
at com.google.inject.internal.InjectorImpl.createUninitializedBinding (com.google.inject.Key,com.google.inject.internal.Scoping,object,com.google.inject.internal.Errors,bool) <0x003bb>
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding (com.google.inject.Key,com.google.inject.internal.Errors,bool,com.google.inject.internal.InjectorImpl/JitLimitation) <0x002a3>
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive (com.google.inject.Key,com.google.inject.internal.Errors,bool,com.google.inject.internal.InjectorImpl/JitLimitation) <0x0022f>
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding (com.google.inject.Key,com.google.inject.internal.Errors,com.google.inject.internal.InjectorImpl/JitLimitation) <0x002ff>
at com.google.inject.internal.InjectorImpl.getBindingOrThrow (com.google.inject.Key,com.google.inject.internal.Errors,com.google.inject.internal.InjectorImpl/JitLimitation) <0x0005f>
at com.google.inject.internal.InjectorImpl.getInternalFactory (com.google.inject.Key,com.google.inject.internal.Errors,com.google.inject.internal.InjectorImpl/JitLimitation) <0x0001b>
at com.google.inject.internal.FactoryProxy.notify (com.google.inject.internal.Errors) <0x0006b>
at com.google.inject.internal.ProcessedBindingData.runCreationListeners (com.google.inject.internal.Errors) <0x00128>
at com.google.inject.internal.InternalInjectorCreator.initializeStatically () <0x00133>
at com.google.inject.internal.InternalInjectorCreator.build () <0x000db>
at com.google.inject.Guice.createInjector (com.google.inject.Stage,java.lang.Iterable) <0x00067>
at com.google.inject.Guice.createInjector (java.lang.Iterable) <0x0003b>
at com.google.inject.Guice.createInjector (com.google.inject.Module[]) <0x00017>
at net.my.project.core.launcher.IncorporatedLauncher.main (java.lang.Class,com.google.inject.Module) <0x00077>
at sandbox.MainClass.Main (string[]) <0x0015f>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0x000d1>
Native stacktrace:
/usr/bin/cli(+0xc8d94) [0x55f4edbd2d94]
/usr/bin/cli(+0x12204e) [0x55f4edc2c04e]
/usr/bin/cli(+0x3e063) [0x55f4edb48063]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11100) [0x7fdfe8bf3100]
/usr/bin/cli(+0x1ff7ce) [0x55f4edd097ce]
/usr/bin/cli(+0x16b750) [0x55f4edc75750]
[0x41db46bb]
Moving the default method into the implementation(s) is work-a-round
This looks like a bug in the underlying CLI runtime.