jtrfp / terminal-recall

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

java.lang.ClassCastException: class org.jtrfp.trcl.gui.RootWindowFactory$RootWindow cannot be cast to class org.jtrfp.trcl.core.TRFactory$TR (org.jtrfp.trcl.gui.RootWindowFactory$RootWindow #263

Closed cjritola closed 2 years ago

cjritola commented 2 years ago

Cyclical dependency - GPUFeature is looking for a GLExecutor in apply(), which then causes it to instantiate itself. Breaks startup.

Build ID: 4d1a0e7c580f8ca02a3132f79e9513540e5b651e
Branch: master
java.lang.ClassCastException: class org.jtrfp.trcl.gui.RootWindowFactory$RootWindow cannot be cast to class org.jtrfp.trcl.core.TRFactory$TR (org.jtrfp.trcl.gui.RootWindowFactory$RootWindow and org.jtrfp.trcl.core.TRFactory$TR are in unnamed module of loader 'app')
        at org.jtrfp.trcl.ext.tr.GPUFactory.newInstance(GPUFactory.java:30)
        at org.jtrfp.trcl.core.FeaturesImpl.newFeatureInstance(FeaturesImpl.java:148)
        at org.jtrfp.trcl.core.FeaturesImpl.getFeature(FeaturesImpl.java:137)
        at org.jtrfp.trcl.core.FeaturesImpl.get(FeaturesImpl.java:173)
        at org.jtrfp.trcl.core.Features.get(Features.java:64)
        at org.jtrfp.trcl.ext.tr.GPUFactory$GPUFeature.apply(GPUFactory.java:41)
        at org.jtrfp.trcl.ext.tr.GPUFactory$GPUFeature.apply(GPUFactory.java:32)
        at org.jtrfp.trcl.core.FeaturesImpl.newFeatureInstance(FeaturesImpl.java:154)
        at org.jtrfp.trcl.core.FeaturesImpl.getFeature(FeaturesImpl.java:137)
        at org.jtrfp.trcl.core.FeaturesImpl.get(FeaturesImpl.java:173)
        at org.jtrfp.trcl.core.Features.get(Features.java:64)
        at org.jtrfp.trcl.ext.tr.SoundSystemFactory$SoundSystemFeature.apply(SoundSystemFactory.java:36)
        at org.jtrfp.trcl.ext.tr.SoundSystemFactory$SoundSystemFeature.apply(SoundSystemFactory.java:27)
        at org.jtrfp.trcl.core.FeaturesImpl.newFeatureInstance(FeaturesImpl.java:154)
        at org.jtrfp.trcl.core.FeaturesImpl.getFeature(FeaturesImpl.java:137)
        at org.jtrfp.trcl.core.FeaturesImpl.get(FeaturesImpl.java:173)
        at org.jtrfp.trcl.core.FeaturesImpl.init(FeaturesImpl.java:105)
        at org.jtrfp.trcl.core.FeaturesImpl.newFeatureInstance(FeaturesImpl.java:155)
        at org.jtrfp.trcl.core.FeaturesImpl.getFeature(FeaturesImpl.java:137)
        at org.jtrfp.trcl.core.FeaturesImpl.get(FeaturesImpl.java:173)
        at org.jtrfp.trcl.core.FeaturesImpl.init(FeaturesImpl.java:105)
        at org.jtrfp.trcl.core.Features.init(Features.java:56)
        at org.jtrfp.trcl.flow.RunMe$1.run(RunMe.java:71)
        at org.jtrfp.trcl.core.DefaultKeyedExecutor.executeAllFromThisThread(DefaultKeyedExecutor.java:64)
        at org.jtrfp.trcl.flow.TransientExecutor$TransientThread.run(TransientExecutor.java:43)
Exception in thread "Transient Thread" org.jtrfp.trcl.core.FeaturesImpl$FeatureTargetMismatchException: Feature `class org.jtrfp.trcl.ext.tr.GPUFactory$GPUFeature` cannot be applied to class ` org.jtrfp.trcl.gui.RootWindowFactory$RootWindow
        at org.jtrfp.trcl.core.FeaturesImpl.newFeatureInstance(FeaturesImpl.java:151)
        at org.jtrfp.trcl.core.FeaturesImpl.getFeature(FeaturesImpl.java:137)
        at org.jtrfp.trcl.core.FeaturesImpl.get(FeaturesImpl.java:173)
        at org.jtrfp.trcl.core.Features.get(Features.java:64)
        at org.jtrfp.trcl.ext.tr.GPUFactory$GPUFeature.apply(GPUFactory.java:41)
        at org.jtrfp.trcl.ext.tr.GPUFactory$GPUFeature.apply(GPUFactory.java:32)
        at org.jtrfp.trcl.core.FeaturesImpl.newFeatureInstance(FeaturesImpl.java:154)
        at org.jtrfp.trcl.core.FeaturesImpl.getFeature(FeaturesImpl.java:137)
        at org.jtrfp.trcl.core.FeaturesImpl.get(FeaturesImpl.java:173)
        at org.jtrfp.trcl.core.Features.get(Features.java:64)
        at org.jtrfp.trcl.ext.tr.SoundSystemFactory$SoundSystemFeature.apply(SoundSystemFactory.java:36)
        at org.jtrfp.trcl.ext.tr.SoundSystemFactory$SoundSystemFeature.apply(SoundSystemFactory.java:27)
        at org.jtrfp.trcl.core.FeaturesImpl.newFeatureInstance(FeaturesImpl.java:154)
        at org.jtrfp.trcl.core.FeaturesImpl.getFeature(FeaturesImpl.java:137)
        at org.jtrfp.trcl.core.FeaturesImpl.get(FeaturesImpl.java:173)
        at org.jtrfp.trcl.core.FeaturesImpl.init(FeaturesImpl.java:105)
        at org.jtrfp.trcl.core.FeaturesImpl.newFeatureInstance(FeaturesImpl.java:155)
        at org.jtrfp.trcl.core.FeaturesImpl.getFeature(FeaturesImpl.java:137)
        at org.jtrfp.trcl.core.FeaturesImpl.get(FeaturesImpl.java:173)
        at org.jtrfp.trcl.core.FeaturesImpl.init(FeaturesImpl.java:105)
        at org.jtrfp.trcl.core.Features.init(Features.java:56)
        at org.jtrfp.trcl.flow.RunMe$1.run(RunMe.java:71)
        at org.jtrfp.trcl.core.DefaultKeyedExecutor.executeAllFromThisThread(DefaultKeyedExecutor.java:64)
        at org.jtrfp.trcl.flow.TransientExecutor$TransientThread.run(TransientExecutor.java:43)
cjritola commented 2 years ago

Looks fixed so far...