java.lang.IllegalArgumentException

Cannot handle replace call to list in ij.Menus's public static synchronized java.lang.String[] getPlugins()

Samebug tips1

If you're using multiple frameworks on your project, check if this is not a problem between mismatched versions of javassist between them.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web60

  • via GitHub by shntnu
    ,
  • Stack trace

    • java.lang.IllegalArgumentException: Cannot handle replace call to list in ij.Menus's public static synchronized java.lang.String[] getPlugins() at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:725) at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:650) at net.imagej.patcher.LegacyExtensions.addExtraPlugins(LegacyExtensions.java:477) at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:175) at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:308) at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:109) at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:101) at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:495) at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:397) at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:376) at net.imagej.patcher.JavaAgent.preinit(JavaAgent.java:147) at net.imagej.patcher.JavaAgent.premain(JavaAgent.java:95) 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:497) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401) Caused by: java.lang.RuntimeException: java.io.IOException: invalid constant type: 18 at javassist.CtClassType.getClassFile2(CtClassType.java:203) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:110) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:96) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:704) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:681) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:241) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:329) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:390) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:354) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.Javac.compileStmnt(Javac.java:568) at javassist.expr.MethodCall.replace(MethodCall.java:234) at net.imagej.patcher.CodeHacker$7.edit(CodeHacker.java:686) at javassist.expr.ExprEditor.loopBody(ExprEditor.java:191) at javassist.expr.ExprEditor.doit(ExprEditor.java:90) at javassist.CtBehavior.instrument(CtBehavior.java:618) at net.imagej.patcher.CodeHacker$EagerExprEditor.instrument(CodeHacker.java:1278) at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:670) ... 17 more Caused by: java.io.IOException: invalid constant type: 18 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1027) at javassist.bytecode.ConstPool.read(ConstPool.java:970) at javassist.bytecode.ConstPool.<init>(ConstPool.java:127) at javassist.bytecode.ClassFile.read(ClassFile.java:693) at javassist.bytecode.ClassFile.<init>(ClassFile.java:85) at javassist.CtClassType.getClassFile2(CtClassType.java:190) ... 37 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    treefolktreefolk
    11 times, last one
    Unknown visitor
    Unknown visitorOnce,
    andyglickandyglick
    29 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    27 more bugmates