-
Notifications
You must be signed in to change notification settings - Fork 184
INVOKESPECIAL/STATIC on interfaces require ASM 5 #498
Comments
http://mythicmobs.net/manual/doku.php/changelog#section241 Something changed with MythicMobs between v2.4.1 -> v2.4.5 Did you discuss this with the MythicMobs's dev/s? |
Have you tried using a lower version of Mythic mobs? |
v2.4.5 is for 1.9. Thermos is for 1.7.10. I don't think those numbers match 🐱 |
2.4.5 is not just for 1.9. |
spannerman79 yes i am say MythicMobs`s devs Also i now try use 2.4.1-2.4.4, and error on start: v2.4.5 started, but crashed on command /mm mobs
Yes 2.3.0, worked, but docs irrelevant and mobs can`t drop mod items, I would like fresher, maybe it fixed.
v2.4.5 for 1.7.10 should also work. |
It shouldn't work. We don't have asm 5 if I remember correctly. |
(You can't install asm 5 it has to be added as a library, which means getting rid of the older one) |
Loaded ASM 5.1 - from logs [asm-all-5.0.3.jar:5.1] |
Seems this issue has to do with java 8 compatibility... |
What need to Fix? Plugin, Thermos? |
Plugin is not at fault, it works fine on vanilla spigot. |
I just ran this plugin and had no issues in a test environment. But I'm using Java U102. |
@iKaneki-Ken Thermos 57 + 2.4.5 MM ? |
Please ROBOTIA give the solution !! |
I'm not sure what the solution is, but the problem is all over Google. |
@Rubbertjuh Yes I did. |
@kalek3 A solution to a problem like this can't be given immediately. Time is required when it comes to situations like this as testing is required before implementing a commit. So please, be patient with Robotia. |
All right, but I hope there is a solution ! |
The version 5.0.3 is indeed loaded. I found this old issue where someone had the problem. But MinecraftForge is now on OpCodes.ASM5, so this All OpCodes are set to ASM 5. They used to be ASM4 a long time ago. |
Yes sure, I just download your last thermos version and the last mythicmobs plugin, not more, but it still not working. |
This has nothing to do with forge transformers. plugins are remapped using specialsource and stacktrace clearly shows that. And thermos bundles outdated specialsource version that still uses Opcodes.ASM4. |
Thank you for catching that, I was in a rush when I made my last comment @Shevchik. I do not think it is safe to update special source in this case though -- it could break compatibility with plugins designed for 1.7.10. Do you know if upgrading the special source version causes any issues? |
No idea, closed my modded server long time ago. Maybe it can break everything on update (not just 1.7.10, because all plugins are remapped actually), so just try? I use specialsource to remap jars in some of my projects and it works. |
I would opt to try ! |
That update has failed build tests @robotia https://travis-ci.org/CyberdyneCC/Thermos/builds/155127126 |
What does it mean? |
Why ? |
That's why. |
Ok, can it be solved? |
I got the OP exception by simply adding any of the Discord Java Libraries (JDA, Javacord, Discord4J) to a Bukkit plugin and running it on Thermos. So I decided to do some investigation. I checked all source codes, and honestly I couldn't find anything wrong on Thermos, nor on SpecialSource. The error shouldn't be an error at all. So I've looked into ASM source code. It seems to use ASM5 by default, so everything should work properly. So I just decided to check the actual exception cause. This is the method that throws the exception: public void visitMethodInsn(int opcode, String owner, String name,
String desc, boolean itf) {
if (api < Opcodes.ASM5) {
if (itf != (opcode == Opcodes.INVOKEINTERFACE)) {
throw new IllegalArgumentException(
"INVOKESPECIAL/STATIC on interfaces require ASM 5");
}
visitMethodInsn(opcode, owner, name, desc);
return;
}
if (mv != null) {
mv.visitMethodInsn(opcode, owner, name, desc, itf);
}
} I couldn't find what causes the "api" attribute to be assigned to a value lower than Opcodes.ASM5. As specified on a previous post by Robotia, Thermos is using ASM5, I've checked that too. I run out of time and ideas. Then I thought, "what if I just suppress the error?" So I did something that shouldn't be done: bytecode editor and added a little "goto" that skips the exception. That made both my plugin and MythicMobs work just fine. I know, this is a wrong thing to do. Please don't punch me! 😲 I am not sure if I should post the modified jar and/or give details about the bytecode edit I've done. Let me know. EDIT: I did some further investigation. I added some debug code to check what is actually using ASM4. I made a log of all stack traces that use ASM4: log.zip I think SpecialSource is the culprit. |
The solution is so easy that I wonder why nobody tested it. The SpecialSource library included with Thermos uses ASM4. This is how I fixed it:
I am using Thermos 1.7.10-1614.56, but I think the fix should be the same or similar for other Thermos versions. |
Thank you for testing this @KaiKikuchi. I do not recommend setting this as a default, however. ASM4 is used by mods and plugins that were for 1.7.10, (namely MobiusCore/Opis) and forcing ASM5 could cause problems. 😕 If anyone finds that ASM5 works perfectly with MobiusCore and Opis, please post here. Thanks! |
Hey Robotia. Thank you for your reply. Honestly I don't think that updating SpecialSource will cause issues to other plugins and mods, as I noticed that the current version of ASM supports both ASM4 and ASM5. Also the current version of ASM uses ASM5 by default. And Forge uses ASM5 by default too. Honestly, I don't know how this could affect plugins. Currently, it's not affecting any of the plugins I use. Anyway, we will still test this and let you know if any issue arises. |
I can confirm that the fix @KaiKikuchi provided is indeed working. I tested it with MythicMobs and everything was working out like it is suppose to do. Thanks a lot for making this fix Kaikikuchi, I'm sure a lot of people appreciate this a lot! Just for clarification, I'm running tekkit legends and FTB infinity with both a decent amount of plugins on the server, none of these plugins and mods broke because we upgraded the library. Donating to you as we speak as this is something I've wanted for a long time now! |
Citizens doesn't work with ASM 5 too :/ |
Server Log: http://pastebin.com/mPZ1AvyU
Explanation of issue:
INVOKESPECIAL/STATIC on interfaces require ASM 5,but i have installed ASM 5,
Screenshot
How to recreate this issue: Just install MythicMobs plugin v2.4.5
Thermos Version: 1.7.10-1614.57
The text was updated successfully, but these errors were encountered: