Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Elytra events cause log errors from illegal names #1934

Closed
TropheusJ opened this issue Dec 24, 2021 · 4 comments
Closed

[BUG] Elytra events cause log errors from illegal names #1934

TropheusJ opened this issue Dec 24, 2021 · 4 comments

Comments

@TropheusJ
Copy link
Contributor

TropheusJ commented Dec 24, 2021

java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/ClientPlayerEntityMixin
java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/PlayerEntityMixin
java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/LivingEntityMixin

These three classes have their paths specified incorrectly in their corresponding mixins.json file. It should be elytra.<class name>, not elytra/<class name>.
I'm not sure if these mixins are even applying.

FAPI: 0.45.0+1.18
loader: 0.12.11

@warjort
Copy link

warjort commented Dec 24, 2021

I can't reproduce this, at least in a development environment?

Can you post your log/latest.log, the versions you report this against shouldn't even load.
Fabric API 0.45.0+1.18 requires fabric-loader 0.12.12
https://github.com/FabricMC/fabric/blob/1.18/src/main/resources/fabric.mod.json
When I try to use loader 0.12.11 in a dev environment it forces loader 0.12.12 with fabric api 0.45.0+1.18

I'm not sure if these mixins are even applying.

If it can't find the classes it won't be applying them.

One thing I do know is that Sponge used to use the / format for class names internally but it was changed because the new forge loader started using the . names. But that was a few months ago.
There was also this recent change in the way file paths are handled by sponge mixin:
SpongePowered/Mixin#534
but I doubt that is relevant here since the classes will be in a jar uri?

@TropheusJ
Copy link
Contributor Author

TropheusJ commented Dec 25, 2021

latest.log
Loader has been updated since report, but error still occurs.

@warjort
Copy link

warjort commented Dec 25, 2021

I can see what is different now.
You are using the java agent which does hotswapping of mixins while I was doing it from the command line.

[14:01:10] [main/WARN]: Catching java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/PlayerEntityMixin
java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/PlayerEntityMixin
	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:886) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:1010) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:874) ~[?:?]
	at org.spongepowered.tools.agent.MixinAgentClassLoader.addMixinClass(MixinAgentClassLoader.java:68) [sponge-mixin-0.10.7+mixin.0.8.4.jar:0.10.7+mixin.0.8.4]
	at org.spongepowered.tools.agent.MixinAgent.registerMixinClass(MixinAgent.java:181) [sponge-mixin-0.10.7+mixin.0.8.4.jar:0.10.7+mixin.0.8.4]
	at org.spongepowered.asm.mixin.transformer.MixinProcessor$1.onPrepare(MixinProcessor.java:528) [sponge-mixin-0.10.7+mixin.0.8.4.jar:0.10.7+mixin.0.8.4]
	at org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:877) 

Somewhere in the agent processing it is missing some code that "fixes" the class name '/' -> '.'

Can you try running gradlew.bat runclient to confirm you don't get the error.

This is not an area I am very familiar with.
But, assuming the use of "/" is not invalid in the mixin configuration I guess this bug report belongs on the mixin project.
https://github.com/FabricMC/Mixin/issues

@TropheusJ
Copy link
Contributor Author

after disabling the javaagent, the error is gone. This seems to be the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants