Inconsistent constant pool data error error with Java 17 runtimes. Is this a Java 8 compilation issue?
ChrisTrenkamp opened this issue · 5 comments
Question
I have a job that uses LWJGL in a Gradle task. I'm unable to upgrade the Gradle version to 8.10 or later because I get this error:
Inconsistent constant pool data in classfile for class org/lwjgl/system/Configuration$StateInit. Method 'java.lang.String gradle$intercept$$java$lang$System$$getProperty$0(java.lang.String)' at index 86 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
This is the only issue I can find related to this: https://stackoverflow.com/q/63779493
And this issue linked from the stackoverflow page: https://issues.apache.org/jira/browse/CURATOR-509
The Gradle 8.10 release notes says that it now requires a Java 17 runtime, but I don't think that's the root cause of this issue. Is LWJGL compiled with an older revision of Java 8 which might be exposed to this problem?
Thanks
Hey @ChrisTrenkamp,
Which LWJGL version do you use? FWIW, 3.3.4 was built on 8u422.
Yes, I'm running 3.3.4. 8u422 shouldn't be affected by this bug. The only common denominator left is Gradle itself, though I don't know what the issue could possibly be, other than the new Java 17 runtime.
Thank you for the response.
As you can see the method name begins with gradle$intercept$$$ which means it was modified by gradle bytecode interceptor - you probably shouldnt use LWJGL inside of a task
My eyes just glazed over that part. Thanks for pointing that out.
(For reference: The upstream issue has been fixed in Gradle 8.11.1)