字节伙伴检测导致异常:java.lang.IllegalStateException:操作数堆栈上的意外余数:-1

Byte buddy instrumentation causes an exception: java.lang.IllegalStateException: Unexpected remainder on the operand stack: -1

与讨论的问题相关 我得到以下异常:

[Byte Buddy] ERROR com.panaya.as.web.util.WebAnalyticsUtils$AnalyticsData[WebappClassLoader
    context: 
    delegate: false
  repositories:
----------> Parent Classloader:
ClassRealm[plugin>org.apache.tomcat.maven:tomcat7-maven-plugin:2.2-1614397209, parent: sun.misc.Launcher$AppClassLoader@14dad5dc]
, null]
java.lang.IllegalStateException: Unexpected remainder on the operand stack: -1
    at net.bytebuddy.utility.StackAwareMethodVisitor.drainStack(StackAwareMethodVisitor.java:120)
    at net.bytebuddy.asm.Advice$AdviceVisitor$WithExitAdvice.onVisitInsn(Advice.java:1704)
    at net.bytebuddy.utility.ExceptionTableSensitiveMethodVisitor.visitInsn(ExceptionTableSensitiveMethodVisitor.java:288)
    at org.objectweb.asm.ClassReader.a(Unknown Source)
    at org.objectweb.asm.ClassReader.b(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at net.bytebuddy.dynamic.scaffold.TypeWriter$Default$ForInlining.create(TypeWriter.java:3018)
    at net.bytebuddy.dynamic.scaffold.TypeWriter$Default.make(TypeWriter.java:1617)
    at net.bytebuddy.dynamic.scaffold.inline.RedefinitionDynamicTypeBuilder.make(RedefinitionDynamicTypeBuilder.java:171)
    at net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Simple$Resolution.apply(AgentBuilder.java:5849)
    at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:6242)
    at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.access0(AgentBuilder.java:6067)
    at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:6566)
    at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:6516)
    at java.security.AccessController.doPrivileged(Native Method)
    at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:6180)
    at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
    at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access0(URLClassLoader.java:73)
    at java.net.URLClassLoader.run(URLClassLoader.java:368)
    at java.net.URLClassLoader.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1191)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1669)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
    ...

代理在 tomcat 服务器之上的企业 Web 应用程序上运行。 大多数 classes 都可以毫无问题地进行检测,但仍然... 我试图在独立的 fiddle 中重现异常,但我找不到 class 的任何唯一规范,检测失败... 我想这与 class 使用的特定框架或注释有关。

感谢任何指点....

您在字节好友中发现了一个错误。它在版本 1.4.17 中得到解决,现在可以从 Maven Central 获得。