jtrfp / terminal-recall

Engine remake for Terminal Velocity and Fury3
Eclipse Public License 1.0
56 stars 2 forks source link

Dosn't Work with newer Java JRE Versions ! #272

Open TP555 opened 2 years ago

TP555 commented 2 years ago

Hi

Your Terminal Recall Port , works only with Java 11.x JRE , not with newer Versions like 17. 18 have no installer yet , just unpack all Java Files where the runme.bat , jar is located won't work , either with Java 11. , so i could not test with Java 18. Yet.

https://adoptopenjdk.net/ is out Dated now New Source : https://adoptium.net/archive.html?variant=openjdk17&jvmVariant=hotspot

The Performance is very laggy sometimes , so i did think newer Java Version , may fix that for better Performance. !!

cjritola commented 2 years ago

By 'laggy' do you mean occasionally sluggish controls, do you mean occasionally low frame rates? When do these most commonly occur? Near a tunnel entrance? During a meteor shower? etc

Which adoptium JVM are you using? OpenJ9? Hotspot?

FoxMcloud5655 commented 4 months ago

Redirected here from issue #274. Having the same issue; tests fail when using Java 17. Here's the dump of my version info:

openjdk 17.0.4.1 2022-08-12
OpenJDK Runtime Environment JBR-17.0.4.1+1-653.1-nomod (build 17.0.4.1+1-b653.1)
OpenJDK 64-Bit Server VM JBR-17.0.4.1+1-653.1-nomod (build 17.0.4.1+1-b653.1, mixed mode, sharing)

Below is the report as taken from the print_surefire_reports.sh script:

Test set: org.jtrfp.trcl.coll.ObjectTallyCollectionTest
-------------------------------------------------------------------------------
Tests run: 19, Failures: 0, Errors: 19, Skipped: 0, Time elapsed: 0.05 sec <<< FAILURE!
testGetDelegate(org.jtrfp.trcl.coll.ObjectTallyCollectionTest)  Time elapsed: 0.043 sec  <<< ERROR!
java.lang.ExceptionInInitializerError
        at org.mockito.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
        at org.mockito.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
        at org.mockito.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:217)
        at org.mockito.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
        at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:117)
        at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:109)
        at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:105)
        at org.mockito.cglib.proxy.Enhancer.<clinit>(Enhancer.java:70)
        at org.mockito.internal.creation.cglib.ClassImposterizer.createProxyClass(ClassImposterizer.java:95)
        at org.mockito.internal.creation.cglib.ClassImposterizer.imposterise(ClassImposterizer.java:57)
        at org.mockito.internal.creation.cglib.ClassImposterizer.imposterise(ClassImposterizer.java:49)
        at org.mockito.internal.creation.cglib.CglibMockMaker.createMock(CglibMockMaker.java:24)
        at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:33)
        at org.mockito.internal.MockitoCore.mock(MockitoCore.java:59)
        at org.mockito.Mockito.mock(Mockito.java:1284)
        at org.mockito.Mockito.mock(Mockito.java:1162)
        at org.jtrfp.trcl.coll.ObjectTallyCollectionTest.setUp(ObjectTallyCollectionTest.java:46)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
        at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @67f89fa3
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
        at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
        at org.mockito.cglib.core.ReflectUtils$2.run(ReflectUtils.java:57)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at org.mockito.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:47)

If you need more info, please let me know.

cjritola commented 4 months ago

Fixed some issues, was not able to get it working in Oracle java 17. Attempted to bump JOGL from 2.3.2 to 2.0.4 and image renders offset (see image). offset When window is expanded, the offset increases toward the bottom right. Querying X and Y coordinates of the Canvas with each reshape() show it to insist it is still at 0,0. I don't know what I might be doing wrong and if it is nothing, I don't have the resources to debug someone else's code.

Considering doing a re-code in the coming years.

Please use Temurin 11, like the documentation says.