Git Product home page Git Product logo

Comments (12)

jeffreykog avatar jeffreykog commented on June 4, 2024

Same error when mixing in to ServerStatusResponse$MinecraftProtocolVersionIdentifier, which also has an inner class. This inner class is public (1) and static (8), that adds op to 9 as modifier. The error tells that it's 41. 41 - 9 = 32, which also is ACC_SUPER

from mixin.

Mumfrey avatar Mumfrey commented on June 4, 2024

Interesting, it's actually not mixin which is setting the ACC_SUPER flag, at least I don't think so, and I can't even think of a good reason that it would be disallowed on inner classes in the first place, although apparently this is the case. Are there any other transformers in play which might be setting the flag that you know of? Since we haven't run across this issue yet in Sponge.

It's no problem to have the mixin transformer strip the invalid flag, but it would be good to know where it's coming from.

The dumpTargetOnFailure isn't firing because that only catches actual mixin application errors (errors thrown by the mixin processor itself when it failed to apply) and doesn't catch other errors thrown by plugin modules like the validator, although it would be pretty easy to add that if it'll help you debug this issue.

from mixin.

Mumfrey avatar Mumfrey commented on June 4, 2024

Just checked out the bytecode in vanilla and in forge and neither have the invalid flag on their inner class declaration:

Forge

cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$TempCategory", "net/minecraft/world/biome/BiomeGenBase", "TempCategory", ACC_PUBLIC + ACC_FINAL + ACC_STATIC + ACC_ENUM);
cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$SwitchEnumCreatureType", "net/minecraft/world/biome/BiomeGenBase", "SwitchEnumCreatureType", ACC_FINAL + ACC_STATIC);
cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$SpawnListEntry", "net/minecraft/world/biome/BiomeGenBase", "SpawnListEntry", ACC_PUBLIC + ACC_STATIC);
cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$Height", "net/minecraft/world/biome/BiomeGenBase", "Height", ACC_PUBLIC + ACC_STATIC);
cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$FlowerEntry", "net/minecraft/world/biome/BiomeGenBase", "FlowerEntry", ACC_PUBLIC + ACC_STATIC);
cw.visitInnerClass("net/minecraft/block/BlockFlower$EnumFlowerType", "net/minecraft/block/BlockFlower", "EnumFlowerType", ACC_PUBLIC + ACC_FINAL + ACC_STATIC + ACC_ENUM);
cw.visitInnerClass("net/minecraftforge/event/terraingen/BiomeEvent$GetWaterColor", "net/minecraftforge/event/terraingen/BiomeEvent", "GetWaterColor", ACC_PUBLIC + ACC_STATIC);
cw.visitInnerClass("net/minecraftforge/event/terraingen/BiomeEvent$GetGrassColor", "net/minecraftforge/event/terraingen/BiomeEvent", "GetGrassColor", ACC_PUBLIC + ACC_STATIC);
cw.visitInnerClass("net/minecraftforge/event/terraingen/BiomeEvent$GetFoliageColor", "net/minecraftforge/event/terraingen/BiomeEvent", "GetFoliageColor", ACC_PUBLIC + ACC_STATIC);
cw.visitInnerClass("net/minecraft/block/BlockTallGrass$EnumType", "net/minecraft/block/BlockTallGrass", "EnumType", ACC_PUBLIC + ACC_FINAL + ACC_STATIC + ACC_ENUM);
cw.visitInnerClass("net/minecraft/block/BlockSand$EnumType", "net/minecraft/block/BlockSand", "EnumType", ACC_PUBLIC + ACC_FINAL + ACC_STATIC + ACC_ENUM);
cw.visitInnerClass("net/minecraft/util/WeightedRandom$Item", "net/minecraft/util/WeightedRandom", "Item", ACC_PUBLIC + ACC_STATIC);

Vanilla

cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$TempCategory", "net/minecraft/world/biome/BiomeGenBase", "TempCategory", ACC_PUBLIC + ACC_FINAL + ACC_STATIC + ACC_ENUM);
cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$SwitchEnumCreatureType", "net/minecraft/world/biome/BiomeGenBase", "SwitchEnumCreatureType", ACC_FINAL + ACC_STATIC);
cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$SpawnListEntry", "net/minecraft/world/biome/BiomeGenBase", "SpawnListEntry", ACC_PUBLIC + ACC_STATIC);
cw.visitInnerClass("net/minecraft/world/biome/BiomeGenBase$Height", "net/minecraft/world/biome/BiomeGenBase", "Height", ACC_PUBLIC + ACC_STATIC);
cw.visitInnerClass("net/minecraft/block/BlockFlower$EnumFlowerType", "net/minecraft/block/BlockFlower", "EnumFlowerType", ACC_PUBLIC + ACC_FINAL + ACC_STATIC + ACC_ENUM);
cw.visitInnerClass("net/minecraft/block/BlockTallGrass$EnumType", "net/minecraft/block/BlockTallGrass", "EnumType", ACC_PUBLIC + ACC_FINAL + ACC_STATIC + ACC_ENUM);
cw.visitInnerClass("net/minecraft/block/BlockSand$EnumType", "net/minecraft/block/BlockSand", "EnumType", ACC_PUBLIC + ACC_FINAL + ACC_STATIC + ACC_ENUM);

So something in between is definitely adding that flag. Mixin doesn't actually touch inner class data in the target class so I think it's the CheckClassAdapter showing up an error which is being introduced elsewhere.

from mixin.

jeffreykog avatar jeffreykog commented on June 4, 2024

I did not add any other transformers in the last few days. Only change is that i updated to 0.3.3 yesterday, and now it is not working. Currently i am trying some older versions to see if and when something in mixin was changed to cause this, or if i am doing something wrong.

For the ACC_SUPER flag not being allowed on inner classes, see asm's CheckClassAdapter.visitInnerClass. That method gives a list of allowed flags.

I will have a better look at the current setup of things. I can not imagine that something at my side is derping this up, but i want to confirm that. I will report back later whether or not i was able to identify the issue.

from mixin.

Mumfrey avatar Mumfrey commented on June 4, 2024

Yeah I understand why it's failing, but what I'm not sure of what's adding that flag, as I mentioned mixin doesn't actually touch any of those flags (or indeed inner class information at all) so it's more likely that something is adding them and it's the CheckClassAdapter being run in mixin which is showing up the error. Certainly nothing has changed recently which would alter this behaviour.

As I mentioned above, would it help if I altered the behaviour of the dumpTargetOnFailure flag to also dump the class on other failures than pure mixin ones, because I can add that easily and then you might have some more info to go on.

from mixin.

jeffreykog avatar jeffreykog commented on June 4, 2024

That would indeed be nice for some more debugging on my part.

from mixin.

Mumfrey avatar Mumfrey commented on June 4, 2024

Ok, I'll push a change shortly.

from mixin.

Mumfrey avatar Mumfrey commented on June 4, 2024

I'm on IRC by the way if you want to discuss this any further without having to go back and forth here.

from mixin.

jeffreykog avatar jeffreykog commented on June 4, 2024

This has been caused by me being lazy and using setupDevWorkspace instead of setupDecompWorkspace. Apparently ForgeGradle's deobfuscator injects those ACC_SUPER flags. When running decompiled setup, it recompiles the decompiled code, so those invalid flags are not in.

I will talk to abrar about these invalid flags. Thanks for your help on this issue.

from mixin.

Mumfrey avatar Mumfrey commented on June 4, 2024

No problem, if it's still an issue I can have the Mixin transformer strip those flags if necessary since it's likely only the CheckClassAdapter which will give a monkeys'. Re-open the issue if need be.

from mixin.

jeffreykog avatar jeffreykog commented on June 4, 2024

Fixed in ModCoderPack/MCInjector@05aa80e

from mixin.

Mumfrey avatar Mumfrey commented on June 4, 2024

Nice :)

from mixin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.