Ardor3D/JOGL problems

Ardor3D/JOGL problems

We have a program that relies on Ardor3D, which has worked fine until recently on some of our computers. Not sure what triggered the problem. But here is the stack trace. Any idea how to fix this?

com.jogamp.opengl.GLException: java.lang.reflect.InvocationTargetException
at com.jogamp.opengl.awt.GLJPanel.display(GLJPanel.java:465)
at jogamp.opengl.GLDrawableHelper.invoke(GLDrawableHelper.java:912)
at com.jogamp.opengl.awt.GLJPanel.invoke(GLJPanel.java:1034)
at com.ardor3d.framework.jogl.awt.JoglSwingCanvas.draw(JoglSwingCanvas.java:100)
at com.ardor3d.framework.FrameHandler.updateFrame(FrameHandler.java:90)
at org.concord.energy3d.scene.SceneManager.run(SceneManager.java:440)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1349)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1324)
at com.jogamp.opengl.awt.GLJPanel.display(GLJPanel.java:463)
... 6 more
Caused by: com.jogamp.opengl.GLException: Caught RuntimeException: com.ardor3d.util.Ardor3dException: Error in opengl: invalid enumerant on thread AWT-EventQueue-0
at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.opengl.awt.GLJPanel$OffscreenBackend.doPaintComponent(GLJPanel.java:2095)
at com.jogamp.opengl.awt.GLJPanel.paintComponent(GLJPanel.java:569)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
at com.jogamp.opengl.awt.GLJPanel$12.run(GLJPanel.java:1535)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.RuntimeException: com.ardor3d.util.Ardor3dException: Error in opengl: invalid enumerant
at jogamp.opengl.GLRunnableTask.run(GLRunnableTask.java:67)
at jogamp.opengl.GLDrawableHelper.execGLRunnables(GLDrawableHelper.java:770)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:676)
at com.jogamp.opengl.awt.GLJPanel$Updater.display(GLJPanel.java:1446)
at com.jogamp.opengl.awt.GLJPanel$10.run(GLJPanel.java:1521)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
... 25 more
Caused by: com.ardor3d.util.Ardor3dException: Error in opengl: invalid enumerant
at com.ardor3d.renderer.jogl.JoglRenderer.checkCardError(JoglRenderer.java:689)
at com.ardor3d.renderer.jogl.JoglRenderer.flushFrame(JoglRenderer.java:237)
at com.ardor3d.framework.jogl.JoglCanvasRenderer.draw(JoglCanvasRenderer.java:265)
at com.ardor3d.framework.jogl.JoglDrawerRunnable.run(JoglDrawerRunnable.java:16)
at jogamp.opengl.GLRunnableTask.run(GLRunnableTask.java:61)
... 30 more
Caused by: com.jogamp.opengl.GLException: invalid enumerant
at com.ardor3d.renderer.jogl.JoglRenderer.checkCardError(JoglRenderer.java:686)
... 34 more

Re: Ardor3D/JOGL problems

Administrator

Hey

It's not a problem specific to JogAmp's Ardor3D Continuation or JOGL. Some GPU manufacturers (including Intel) provide some OpenGL drivers that stop working under Windows 10 after some Windows updates and fall back to the crappy Microsoft GDI renderer supporting only OpenGL 1.1. Providing such drivers allows to avoid preventing people to switch to Windows 10 even though the manufacturer plans to drop support of its GPU but at the end, you just get unacceptable performance with softwares that claim to be "Windows 10 ready". The easiest workaround I know consists in using an older version of Java 1.8 that doesn't claim to be "Windows 10 ready" so that the driver provided by the GPU manufacturer goes on working.

Another possible root cause is another (unintentional) driver bug. Then, try to use an older version of this driver.

Re: Ardor3D/JOGL problems

Administrator

You're welcome.

Ardor3D and JogAmp's Ardor3D Continuation are two distinct projects with two distinct agendas that have taken two distinct directions. Personally, I go on copying the fixes of Ardor3D into JogAmp's Ardor3D Continuation but the fixes of JogAmp's Ardor3D Continuation don't get ported to Ardor3D. I know that surprisingly Joshua Slack seems to work anew on the legacy Ardor3D, this is something that I didn't expect as he announced several years ago that he had decided to give up but now, the projects have diverged enough to make it impossible to work together. For example, I dropped the renderer based on an API not maintained by JogAmp and I've been trying to drop Google Guava for years, it drives the merges a bit painful. I implemented some importers whereas Josh wanted to concentrate on Collada, I drove some behaviours a lot easier to override, ... I'm very grateful for his excellent work but I don't want to revert my changes. It's not black or white, our respective decisions make sense in a certain context, I respect his work but I don't expect any cooperation between us now. We made almost 200 commits since Josh left the boat.

Re: Ardor3D/JOGL problems

We are seeing more and more users cannot run Ardor3D because of this bug. For example, we have a whole school that could not run our Energy3D program on brand new Windows computers. Perhaps Joshua has fixed some of the issues, I am hoping? I suspect that not all bugs can be attributed to driver incompatibility.

I suspect that not all bugs can be attributed to driver incompatibility.

Which bugs are you talking about? Please try to run the program using JogAmp's Ardor3D Continuation with an older OpenGL driver or an older version of Java. I don't try to find a false excuse not to look for a fix, there's just nothing to fix in JOGL and JogAmp's Ardor3D Continuation as they aren't to blame. You wrote "The software worked fine just a couple of weeks ago on the same computers", that's why I suggest you to use an older OpenGL driver or an older version of Java, in order to put yourself into the same conditions than a couple of weeks ago when it was working. I know that some end users don't like to change such things but there is nothing to fix in our APIs, the bug is elsewhere.

Re: Ardor3D/JOGL problems

Thanks for your help. I was talking about the same bug as well. The installer has used a Java 8 JRE in the last few months. When it stopped working, I didn't change the installer. And this happened with a computer here that has installed the program before. But all of a sudden, it stops working. I initially suspect it was a Windows update that caused it. But I can't reproduce it on my own computer.

Re: Ardor3D/JOGL problems

Administrator

Actually, I don't even know whether the installer provides a separate JRE for the software or if it relies on the JRE installed on the system. If it's the latter, an update of this JRE might have broken Energy3D.

Microsoft has changed, some Windows updates force WebGL to use the software fallback instead of the hardware acceleration, such a similar option shouldn't be excluded for OpenGL too. Please can you tell me exactly which JRE you use with Energy3D and which graphics card or integrated chipset?

Re: Ardor3D/JOGL problems

We rolled back some of the recent updates on the affected computer and are now looking at each update one by one in hope to nail down which of the updates screwed up. There have been some updates, including one from Adobe Flash Player, since July 4 (before which Energy3D worked fine on the computer). I suspect it could be the Adobe update that broke it. I will let you know if we can confirm this and then we can figure out why.

Re: Ardor3D/JOGL problems

We found that the problem was caused by Intel HD Graphics 530. After disabling it, Energy3D worked fine again. So we went on to update the driver using the Device Manager of Windows 10. It turned out that Intel just released a new update yesterday and it fixed the problem!

Re: Ardor3D/JOGL problems

A bit more information about the problem we were having. I believe it was caused by an Intel update in early July (or June), which was included in a Windows 10 update. After the OS update, Energy3D stopped working properly. Intel probably became aware of this bug they created as many people must have complained about it. So they released another update on July 11 that righted the wrong. Now, for the problem to go away for everyone, we probably have to wait for the Intel update to be included in a future Windows 10 update.

Not all driver updates are good!

PS: In order to remind the user of this problem, I added a check in Energy3D to catch this particular exception and then prompt the user to update the driver. I suppose other people may want to do the same thing as we don't know for how long people have to wait for the Intel update to be delivered.

Re: Ardor3D/JOGL problems

Administrator

Yes it's a good idea. I even have some code that fixes some values returned by some drivers that lie about their capabilities, I understand your position. When I detect Microsoft GDI renderer, I tell the end user to install a real driver and when something goes wrong, I display both the stack trace and a message to the end user telling her/him to update its driver as it might be the cause of the issue.

Re: Ardor3D/JOGL problems

It seems the problem is not over. The latest version of the driver actually doesn't work on many Windows 10 computers. One has to revert back to a version from last fall (it is not realistic to ask folks to do so, especially those who are not tech-savy).