Jire / Abendigo

A free as in both freedom and free beer game modding platform using Kotlin on the JVM.
GNU General Public License v3.0
57 stars 56 forks source link

Error compiling #113

Open aratnitsyn opened 8 years ago

aratnitsyn commented 8 years ago

Hello. This error occurs when compiling the project. What could it be?

Error:(23, 29) Kotlin: [Internal Error] org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'arrayOf' into object AimAssistPlugin : InGamePlugin("Aim Assist", duration = 8) { override val author = "Jire" override val description = "Assists your aim" private const val SMOOTHING_MIN = 7F private const val SMOOTHING_MAX = 9F private const val MIN_ELAPSED = 75 private const val MAX_ELAPSED = 300 private val TARGET_BONES = arrayOf(Bones.HEAD, Bones.HEAD, Bones.HEAD, Bones.HEAD, Bones.NECK) private const val CHANGE_BONE_CHANCE = 30 private const val RESET_TARGET_CHANCE = 13 private var target: Player? = null private var targetBone = newTargetBone() private val aim = Vector(0F, 0F, 0F) private var lastAim = 0L override fun cycle() { val elapsedTime = currentTimeMillis() - lastAim if (elapsedTime < random(MIN_ELAPSED, MAX_ELAPSED)) return try { val weapon = (+Me().weapon).type!! if (!weapon.pistol && !weapon.automatic && !weapon.shotgun) return } catch (t: Throwable) { if (DEBUG) t.printStackTrace() } if (target == null) { val targetAddress = +Me.targetAddress if (targetAddress <= 0) return val targetIndex = csgo.int(targetAddress + m_dwIndex) - 1 if (!Client.enemies.containsKey(targetIndex)) return target = Client.enemies[targetIndex]!! } if (+Me().dead || +target!!.dead || !+target!!.spotted) { target = null return } if (random(CHANGE_BONE_CHANCE) == 0) targetBone = newTargetBone() val enemyPosition = target!!.bonePosition(targetBone.id) val myPosition = +Me().position compensateVelocity(Me(), target!!, enemyPosition, randomFloat(SMOOTHING_MIN, SMOOTHING_MAX)) calculateAngle(Me(), myPosition, enemyPosition, aim.reset()) normalizeAngle(aim) val angle = clientState(1024).angle() normalizeAngle(angle) angleSmooth(aim, angle, randomFloat(SMOOTHING_MIN, SMOOTHING_MAX)) if (random(RESET_TARGET_CHANCE) == 0) { target = null lastAim = currentTimeMillis() } } private fun newTargetBone() = TARGET_BONES[random(TARGET_BONES.size)] } cause: Not generated Cause: Couldn't find declaration file for kotlin/KotlinPackage File being compiled and position: (23,29) in ...AimAssistPlugin.kt PsiElement: arrayOf(Bones.HEAD, Bones.HEAD, Bones.HEAD, Bones.HEAD, Bones.NECK) The root cause was thrown at: InlineCodegen.java:212 at org.jetbrains.kotlin.codegen.inline.InlineCodegen.genCallInner(InlineCodegen.java:158) at org.jetbrains.kotlin.codegen.CallGenerator.genCall(CallGenerator.kt:105) at org.jetbrains.kotlin.codegen.ExpressionCodegen.invokeMethodWithArguments(ExpressionCodegen.java:2429) at org.jetbrains.kotlin.codegen.ExpressionCodegen.invokeMethodWithArguments(ExpressionCodegen.java:2387) at org.jetbrains.kotlin.codegen.Callable$invokeMethodWithArguments$1.invoke(Callable.kt:44) at org.jetbrains.kotlin.codegen.Callable$invokeMethodWithArguments$1.invoke(Callable.kt:23) at org.jetbrains.kotlin.codegen.OperationStackValue.putSelector(StackValue.kt:65) at org.jetbrains.kotlin.codegen.StackValue.put(StackValue.java:109) at org.jetbrains.kotlin.codegen.StackValue.put(StackValue.java:102) at org.jetbrains.kotlin.codegen.StackValue$StackValueWithSimpleReceiver.store(StackValue.java:1556) at org.jetbrains.kotlin.codegen.StackValue.store(StackValue.java:131) at org.jetbrains.kotlin.codegen.MemberCodegen.initializeProperty(MemberCodegen.java:382) at org.jetbrains.kotlin.codegen.MemberCodegen.generateInitializers(MemberCodegen.java:361) at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generateInitializers(ImplementationBodyCodegen.java:1094) at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generatePrimaryConstructorImpl(ImplementationBodyCodegen.java:1033) at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.access$300(ImplementationBodyCodegen.java:93) at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen$4.doGenerateBody(ImplementationBodyCodegen.java:941) at org.jetbrains.kotlin.codegen.FunctionGenerationStrategy$CodegenBased.generateBody(FunctionGenerationStrategy.java:72) at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethodBody(FunctionCodegen.java:365) at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethod(FunctionCodegen.java:204) at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generatePrimaryConstructor(ImplementationBodyCodegen.java:937) at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generateConstructors(ImplementationBodyCodegen.java:398) at org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateBody(ClassBodyCodegen.java:79) at org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:117) at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:231) at org.jetbrains.kotlin.codegen.PackageCodegen.generateClassOrObject(PackageCodegen.java:147) at org.jetbrains.kotlin.codegen.PackageCodegen.generateFile(PackageCodegen.java:98) at org.jetbrains.kotlin.codegen.PackageCodegen.generate(PackageCodegen.java:61) at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.generatePackage(KotlinCodegenFacade.java:99) at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:77) at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:44) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:376) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:121) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:173) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:49) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:181) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:138) at org.jetbrains.kotlin.cli.common.CLICompiler.execAndOutputXml(CLICompiler.java:63) at org.jetbrains.kotlin.daemon.CompileServiceImpl$remoteIncrementalCompile$1.invoke(CompileServiceImpl.kt:246) at org.jetbrains.kotlin.daemon.CompileServiceImpl$remoteIncrementalCompile$1.invoke(CompileServiceImpl.kt:69) at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1$1.invoke(CompileServiceImpl.kt:420) at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1$1.invoke(CompileServiceImpl.kt:69) at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137) at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:453) at org.jetbrains.kotlin.daemon.CompileServiceImpl.access$checkedCompile(CompileServiceImpl.kt:69) at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1.invoke(CompileServiceImpl.kt:419) at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1.invoke(CompileServiceImpl.kt:69) at org.jetbrains.kotlin.daemon.CompileServiceImpl.ifAlive(CompileServiceImpl.kt:559) at org.jetbrains.kotlin.daemon.CompileServiceImpl.ifAlive$default(CompileServiceImpl.kt:524) at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:410) at org.jetbrains.kotlin.daemon.CompileServiceImpl.remoteIncrementalCompile(CompileServiceImpl.kt:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: Couldn't find declaration file for kotlin/KotlinPackage at org.jetbrains.kotlin.codegen.inline.InlineCodegen.createMethodNode(InlineCodegen.java:212) at org.jetbrains.kotlin.codegen.inline.InlineCodegen.genCallInner(InlineCodegen.java:149) ... 67 more