org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 5: Cannot pop operand off an empty stack. File being compiled and position: (7,5) in /Simplest version.kt PsiElement: @JvmOverloads fun a(a: Boolean = false, b: Boolean = false) {} The root cause was thrown at: MethodTransformer.java:34

YouTrack | 7 months ago
  1. 0

    @JvmOverloads does not work in interfaces, causing an exception in compiler

    YouTrack | 7 months ago
    org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 5: Cannot pop operand off an empty stack. File being compiled and position: (7,5) in /Simplest version.kt PsiElement: @JvmOverloads fun a(a: Boolean = false, b: Boolean = false) {} The root cause was thrown at: MethodTransformer.java:34
  2. 0

    Exception from bytecode optimizier on try-catch inside function literal

    YouTrack | 2 years ago
    org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 53: Cannot pop operand off an empty stack. File being compiled and position: (1,1) in /Users/geevee/sandbox/src/run.kt PsiElement: fun f(events: List<String>) { events.map { try { } catch(e: Exception) { } } } The root cause was thrown at: MethodTransformer.java:37
  3. 0

    REPL: IOB exception from code with try-catch

    YouTrack | 2 years ago
    java.lang.RuntimeException: org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerExcepti on: Error at instruction 27: Cannot pop operand off an empty stack.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Compiler fails to inline function while IntelliJ IDEA doesn't flag any errors

    YouTrack | 10 months ago
    org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'lazyField' into import kotlin.properties.ReadOnlyProperty import kotlin.reflect.KProperty val h2: Holder by object : ReadOnlyProperty<Nothing?, Holder> { private lateinit var field: Holder private val value by lazy { field = Holder(0) { field.x++ } field } override fun getValue(thisRef: Nothing?, property: KProperty<*>) = value } class Holder(var x: Int = 0, val action: () -> Unit) val h: Holder by lazyField { Holder(0) { it.x++ } } inline fun <R, T : Any> lazyField(crossinline initializer: (T) -> T) = object : ReadOnlyProperty<R, T> { private lateinit var field: T private val value by lazy { field = initializer(field) field } override fun getValue(thisRef: R, property: KProperty<*>) = value } fun main(args: Array<String>) { h.action() h.action() println(h.x) //2 } Cause: Transformer for LazyFieldKt$lazyField$1: couldn't inline method call cause: getValue (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;: L0 ALOAD 0 GETFIELD LazyFieldKt$lazyField$1.value$delegate : Lkotlin/Lazy; GETSTATIC LazyFieldKt$lazyField$1.$$$$$delegatedProperties : [Lkotlin/reflect/KProperty; ICONST_0 AALOAD INVOKESTATIC kotlin/LazyKt.getValue (Lkotlin/Lazy;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; ARETURN L1 LOCALVARIABLE this LLazyFieldKt$lazyField$1; L0 L1 0 MAXSTACK = 4 MAXLOCALS = 2 File being compiled and position: (17,18) in /path/to/src/main/kotlin/LazyField.kt PsiElement: lazyField { Holder(0) { it.x++ } } The root cause was thrown at: MethodInliner.java:727
  6. 0

    GitHub comment 1#223782403

    GitHub | 6 months ago | WhatATopic
    java.security.PrivilegedActionException: java.security.PrivilegedActionException: org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 5: Cannot pop operand off an empty stack.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IndexOutOfBoundsException

      Cannot pop operand off an empty stack.

      at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.pop()
    2. org.jetbrains.org
      Analyzer.analyze
      1. org.jetbrains.org.objectweb.asm.tree.analysis.Frame.pop(Frame.java:221)
      2. org.jetbrains.org.objectweb.asm.tree.analysis.Frame.execute(Frame.java:612)
      3. org.jetbrains.org.objectweb.asm.tree.analysis.Analyzer.analyze(Analyzer.java:200)
      3 frames
    3. org.jetbrains.kotlin
      KotlinCodegenFacade.compileCorrectFiles
      1. org.jetbrains.kotlin.codegen.optimization.transformer.MethodTransformer.runAnalyzer(MethodTransformer.java:31)
      2. org.jetbrains.kotlin.codegen.optimization.transformer.MethodTransformer.analyze(MethodTransformer.java:44)
      3. org.jetbrains.kotlin.codegen.optimization.boxing.RedundantNullCheckMethodTransformer.removeRedundantNullCheckPass(RedundantNullCheckMethodTransformer.java:40)
      4. org.jetbrains.kotlin.codegen.optimization.boxing.RedundantNullCheckMethodTransformer.transform(RedundantNullCheckMethodTransformer.java:33)
      5. org.jetbrains.kotlin.codegen.optimization.OptimizationMethodVisitor.visitEnd(OptimizationMethodVisitor.java:82)
      6. org.jetbrains.kotlin.codegen.FunctionCodegen.endVisit(FunctionCodegen.java:496)
      7. org.jetbrains.kotlin.codegen.DefaultParameterValueSubstitutor.generateOverloadWithSubstitutedParameters(DefaultParameterValueSubstitutor.kt:216)
      8. org.jetbrains.kotlin.codegen.DefaultParameterValueSubstitutor.generateOverloadsIfNeeded(DefaultParameterValueSubstitutor.kt:89)
      9. org.jetbrains.kotlin.codegen.FunctionCodegen.generateOverloadsWithDefaultValues(FunctionCodegen.java:129)
      10. org.jetbrains.kotlin.codegen.FunctionCodegen.gen(FunctionCodegen.java:121)
      11. org.jetbrains.kotlin.codegen.MemberCodegen.genFunctionOrProperty(MemberCodegen.java:180)
      12. org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateDeclaration(ClassBodyCodegen.java:124)
      13. org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateBody(ClassBodyCodegen.java:74)
      14. org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:117)
      15. org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generateDefaultImplsIfNeeded(ImplementationBodyCodegen.java:245)
      16. org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateBody(ClassBodyCodegen.java:80)
      17. org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:117)
      18. org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:231)
      19. org.jetbrains.kotlin.codegen.PackageCodegen.generateClassOrObject(PackageCodegen.java:147)
      20. org.jetbrains.kotlin.codegen.PackageCodegen.generateFile(PackageCodegen.java:98)
      21. org.jetbrains.kotlin.codegen.PackageCodegen.generate(PackageCodegen.java:61)
      22. org.jetbrains.kotlin.codegen.KotlinCodegenFacade.generatePackage(KotlinCodegenFacade.java:99)
      23. org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:77)
      24. org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:44)
      24 frames
    4. org.jetbrains.webdemo
      BackendHttpServlet.service
      1. org.jetbrains.webdemo.backend.responseHelpers.CompileAndRunExecutor.getResult(CompileAndRunExecutor.java:86)
      2. org.jetbrains.webdemo.backend.MyHttpSession.sendExecutorResult(MyHttpSession.java:86)
      3. org.jetbrains.webdemo.backend.MyHttpSession.handle(MyHttpSession.java:47)
      4. org.jetbrains.webdemo.backend.ServerHandler.handle(ServerHandler.java:41)
      5. org.jetbrains.webdemo.backend.BackendHttpServlet.service(BackendHttpServlet.java:126)
      5 frames
    5. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      1 frame
    6. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    7. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    8. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
      10 frames
    9. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
      3 frames
    10. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:744)
      3 frames