windward-studios / ikvm8

Other
173 stars 36 forks source link

Missing changes from original IKVM #14

Open Draspax opened 4 years ago

Draspax commented 4 years ago

I hit an issue with using ikvmc on poi 4.1.1.

` INTERNAL COMPILER ERROR

PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE

ikvmc, Version=8.5.0.3, Culture=neutral, PublicKeyToken=null C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ 4.0.30319.42000 64-bit

System.InvalidOperationException: Operation is not valid due to the current state of the object. at IKVM.Internal.Boxer.EmitBox(CodeEmitter ilgen, TypeWrapper tw) in D:\Apps\ikvm8-8.5.0.3\runtime\Boxer.cs:line 210 at IKVM.Internal.LambdaMetafactory.EmitDispatch(FinishContext context, TypeWrapper[] args, TypeBuilder tb, MethodWrapper interfaceMethod, TypeWrapper[] implParameters, ConstantPoolItemMethodHandle implMethod, ConstantPoolItemMethodType instantiatedMethodType, FieldBuilder[] capturedFields) in D:\Apps\ikvm8-8.5.0.3\runtime\LambdaMetafactory.cs:line 637 at IKVM.Internal.LambdaMetafactory.CreateConstructorAndDispatch(FinishContext context, ConstantPoolItemInvokeDynamic cpi, TypeBuilder tb, List1 methods, TypeWrapper[] implParameters, ConstantPoolItemMethodType samMethodType, ConstantPoolItemMethodHandle implMethod, ConstantPoolItemMethodType instantiatedMethodType, Boolean serializable) in D:\Apps\ikvm8-8.5.0.3\runtime\LambdaMetafactory.cs:line 430 at IKVM.Internal.LambdaMetafactory.EmitImpl(FinishContext context, ClassFile classFile, ConstantPoolItemInvokeDynamic cpi, BootstrapMethod bsm, CodeEmitter ilgen) in D:\Apps\ikvm8-8.5.0.3\runtime\LambdaMetafactory.cs:line 194 at IKVM.Internal.LambdaMetafactory.Emit(FinishContext context, ClassFile classFile, Int32 constantPoolIndex, ConstantPoolItemInvokeDynamic cpi, CodeEmitter ilgen) in D:\Apps\ikvm8-8.5.0.3\runtime\LambdaMetafactory.cs:line 50 at Compiler.Compile(Block block, Int32 startIndex) in D:\Apps\ikvm8-8.5.0.3\runtime\compiler.cs:line 1444 at Compiler.Compile(FinishContext context, TypeWrapper host, DynamicTypeWrapper clazz, MethodWrapper mw, ClassFile classFile, Method m, CodeEmitter ilGenerator, Boolean& nonleaf) in D:\Apps\ikvm8-8.5.0.3\runtime\compiler.cs:line 820 at IKVM.Internal.DynamicTypeWrapper.FinishContext.FinishImpl() in D:\Apps\ikvm8-8.5.0.3\runtime\DynamicTypeWrapper.cs:line 4562 at IKVM.Internal.DynamicTypeWrapper.JavaTypeImpl.FinishCore() in D:\Apps\ikvm8-8.5.0.3\runtime\DynamicTypeWrapper.cs:line 1842 at IKVM.Internal.DynamicTypeWrapper.JavaTypeImpl.Finish() in D:\Apps\ikvm8-8.5.0.3\runtime\DynamicTypeWrapper.cs:line 1760 at IKVM.Internal.DynamicTypeWrapper.Finish() in D:\Apps\ikvm8-8.5.0.3\runtime\DynamicTypeWrapper.cs:line 419 at IKVM.Internal.AotTypeWrapper.Finish() in D:\Apps\ikvm8-8.5.0.3\ikvmc\AotTypeWrapper.cs:line 108 at IKVM.Internal.DynamicClassLoader.FinishAll() in D:\Apps\ikvm8-8.5.0.3\runtime\DynamicClassLoader.cs:line 387 at IKVM.Internal.CompilerClassLoader.PrepareSave() in D:\Apps\ikvm8-8.5.0.3\ikvmc\CompilerClassLoader.cs:line 532 at IKVM.Internal.CompilerClassLoader.Compile(String runtimeAssembly, List1 optionsList) in D:\Apps\ikvm8-8.5.0.3\ikvmc\CompilerClassLoader.cs:line 2632 at IkvmcCompiler.Compile(String[] args) in D:\Apps\ikvm8-8.5.0.3\ikvmc\Compiler.cs:line 320 at IkvmcCompiler.Main(String[] args) in D:\Apps\ikvm8-8.5.0.3\ikvmc\Compiler.cs:line 242`

I had a look on IKVM-revived and there seemed to be a fix for this issue already on there from almost 4 years ago so should have been in this branch too I would have thought. https://github.com/ikvm-revived/ikvm/commit/9b991fd771d698fe98322fb8c82e59641817ea2a

Its possible this also the source of the problem for : https://github.com/wwrd/ikvm8/issues/10

Is all development moving to ikvm-revived anyway? I might move there as it solves my issue already.