JPro-one / JPro

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

Switching Assertions on leads to unexpected exceptions #100

Open mipastgt opened 3 years ago

mipastgt commented 3 years ago

When I run JPro with assertions switched on via <JVMArg>-ea</JVMArg> then I just get a long list of exceptions like this and the program startup fails.

*** unexpected PG access
java.lang.Exception: Stack trace
    at java.base/java.lang.Thread.dumpStack(Thread.java:1379)
    at javafx.scene.Node.getPeer(Node.java:2598)
    at jdk.internal.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at simplefx.util.ReflectionUtil$UseReflection.applyDynamic(ReflectionUtil.scala:21)
    at com.jpro.internal.jvmabstraction.JVM11.getNodePeer(JVM11.scala:25)
    at com.jpro.meta.stream.Util$ExtParent.peer$lzycompute(Util.scala:302)
    at com.jpro.meta.stream.Util$ExtParent.peer(Util.scala:302)
    at com.jpro.meta.stream.Util$ExtParent.$anonfun$new$34(Util.scala:306)
    at simplefx.cores.standard.parts.CoreTimeEvent.$anonfun$runAt$2(CoreTimeEvent.scala:74)
    at simplefx.cores.standard.parts.CoreTimeEvent$Helper$.$anonfun$new$4(CoreTimeEvent.scala:100)
    at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:330)
    at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:1104)
    at simplefx.cores.standard.parts.CoreTimeEvent$Helper$.$anonfun$new$3(CoreTimeEvent.scala:98)
    at simplefx.cores.standard.parts.CoreTimeEvent$Helper$.$anonfun$new$3$adapted(CoreTimeEvent.scala:91)
    at simplefx.cores.standard.parts.CoreTypesBindable$BindableImpl.$anonfun$triggerOnChange$3(CoreTypesBindable.scala:208)
    at simplefx.cores.standard.parts.CoreScheduler.runSchedulerImpl(CoreScheduler.scala:73)
    at simplefx.cores.standard.parts.CoreScheduler.runSchedulerImpl$(CoreScheduler.scala:52)
    at simplefx.cores.standard.Core.runSchedulerImpl(Core.scala:9)
    at simplefx.cores.standard.parts.CoreScheduler.tryStartSchedulerStop(CoreScheduler.scala:44)
    at simplefx.cores.standard.parts.CoreScheduler.tryStartSchedulerStop$(CoreScheduler.scala:42)
    at simplefx.cores.standard.Core.tryStartSchedulerStop(Core.scala:9)
    at simplefx.cores.standard.parts.CoreTimeEvent$$anon$1.handle(CoreTimeEvent.scala:24)
    at javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$0(AnimationTimer.java:57)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)
    at com.sun.scenario.animation.AbstractPrimaryTimer.timePulseImpl(AbstractPrimaryTimer.java:356)
    at com.sun.scenario.animation.AbstractPrimaryTimer$MainLoop.run(AbstractPrimaryTimer.java:266)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:569)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:553)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:546)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$12(QuantumToolkit.java:348)
    at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
    at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
    at java.base/java.lang.Thread.run(Thread.java:832)
FlorianKirmaier commented 3 years ago

Hmm, I guess nobody has tried that yet. Probably not the highest priority. We will investigate it.

mipastgt commented 3 years ago

That's my fate. I always seem to try things nobody has tried before and then burn my fingers by doing so :-) I normally have assertions on by default during testing. It helps to identify trouble spots early but I switch them off in production. It is not so problematic here because most of the testing is done outside of JPro anyway.