3D viewer cannot work when following "The road to Java 8" steps

java-8
java3d
3d-viewer
Tags: #<Tag:0x00007fb885e4f080> #<Tag:0x00007fb885e4e7e8> #<Tag:0x00007fb885e4ded8>

#1

Hi,

After migrating the Java to version 8 and later enabling the Java-8 update site, the 3D viewer still cannot be run correctly. It does show a “gray” background rather than a “black” one. And the console shows message:

3D [dev] 1.6.0-scijava-2-pre11-daily-experimental daily

org.scijava.java3d.IllegalRenderingStateException: Java 3D ERROR : OpenGL 1.2 or better is required (GL_VERSION=1.1)
	at org.scijava.java3d.JoglPipeline.setupCanvasProperties(JoglPipeline.java:8083)
	at org.scijava.java3d.JoglPipeline.createNewContext(JoglPipeline.java:6440)
	at org.scijava.java3d.Canvas3D.createNewContext(Canvas3D.java:4602)
	at org.scijava.java3d.Canvas3D.createNewContext(Canvas3D.java:2376)
	at org.scijava.java3d.Renderer.doWork(Renderer.java:881)
	at org.scijava.java3d.J3dThread.run(J3dThread.java:271)
Exception occurred in RenderingErrorListener:
java.lang.RuntimeException
	at ij3d.ImageWindow3D$ErrorListener.errorOccurred(ImageWindow3D.java:330)
	at org.scijava.java3d.VirtualUniverse.notifyRenderingErrorListeners(VirtualUniverse.java:1198)
	at org.scijava.java3d.NotificationThread.processNotifications(NotificationThread.java:86)
	at org.scijava.java3d.NotificationThread.run(NotificationThread.java:104)
nFrames = 1

When I tried using the bug report function, I got these messages:

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 10
  os.version => 10.0
  java.version => 1.8.0_65
  java.vendor => Oracle Corporation
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.8.0_65-b17
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 25.65-b01
  java.vm.vendor => Oracle Corporation
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.8
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Program Files\Java\jdk1.8.0_65/jre
  imagej.dir => C:\Users\offsys\Desktop\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20151222101554)
Fiji: http://update.fiji.sc/ (last check:20151222122403)
Java-8: http://sites.imagej.net/Java-8/ (last check:20151222121830)

Files not up-to-date:
  6a7750c0 (OBSOLETE_UNINSTALLED) 20151121200054 jars/ffmpeg-2.6.1-0.11-android-arm.jar
  fd2b5490 (OBSOLETE_UNINSTALLED) 20151121200054 jars/ffmpeg-2.6.1-0.11-android-x86.jar
  4653bdb4 (OBSOLETE_UNINSTALLED) 20151121200056 jars/ffmpeg-2.6.1-0.11-linux-x86.jar
  977eac28 (OBSOLETE_UNINSTALLED) 20151121200056 jars/ffmpeg-2.6.1-0.11-linux-x86_64.jar
  8e223ac3 (OBSOLETE_UNINSTALLED) 20151121200056 jars/ffmpeg-2.6.1-0.11-macosx-x86_64.jar
  ccd3679d (OBSOLETE_UNINSTALLED) 20151121200056 jars/ffmpeg-2.6.1-0.11-windows-x86.jar
  a314dfd6 (OBSOLETE_UNINSTALLED) 20151121200058 jars/ffmpeg-2.6.1-0.11-windows-x86_64.jar
  27dfb30a (MODIFIED) 20151224132538 jars/ij-1.50e.jar

I have no idea what’s the problem on my Java’s settings. Any suggestion will be appreciated.

Thanks and Happy holidays!
chin


3D Viewer Troubleshooting
Test Java 3D crashes
Zoom in/out not working when using 3Dviewer
3D Viewer doesn't work with Java8
#2

There are quite a few reasons that error message could happen. See e.g. these threads:

Are you running Windows in a VM?

If not, are you using the latest graphics drivers from the manufacturer? What is your graphics card make and model?


#3

Hi @chin and @ctrueden.
I can reproduce this bug on my Windows 10 machine (no VM, single monitor).
I have a NVidia GeForce GTX970 with the latest drivers.
How can I help?


#4

Hi,

The graphic card which I used is nVidia GTX 680 with the latest driver and the OpenGL 4.2( according to the manufacturer). I am not running Windows in a VM. Furthermore, I tried to run java 8 Fiji on another PC equipped with a graphic card (AMD Radeon 290) with a win10 system. The 3D viewer still a gray backgrounf and the console showed message:

3D [dev] 1.6.0-scijava-2-pre11-daily-experimental daily

C:\Users\offw\.ImageJ_3D_Viewer.props (The system cannot find the file specified)
com.jogamp.opengl.GLException: J3D-Renderer-1: createImpl ctx !ARB but ARB is used, profile > GL2 requested (OpenGL >= 3.1). Requested: GLProfile[GL4bc/GL4bc.hw], current: 1.1 (Compat profile, compat[], hardware) - 1.1.0
	at jogamp.opengl.windows.wgl.WindowsWGLContext.createImpl(WindowsWGLContext.java:404)
	at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765)
	at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648)
	at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
	at org.scijava.java3d.JoglPipeline.createNewContext(JoglPipeline.java:6412)
	at org.scijava.java3d.Canvas3D.createNewContext(Canvas3D.java:4602)
	at org.scijava.java3d.Canvas3D.createNewContext(Canvas3D.java:2376)
	at org.scijava.java3d.Renderer.doWork(Renderer.java:881)
	at org.scijava.java3d.J3dThread.run(J3dThread.java:271)
Exception occurred in RenderingErrorListener:
java.lang.RuntimeException
	at ij3d.ImageWindow3D$ErrorListener.errorOccurred(ImageWindow3D.java:330)
	at org.scijava.java3d.VirtualUniverse.notifyRenderingErrorListeners(VirtualUniverse.java:1198)
	at org.scijava.java3d.NotificationThread.processNotifications(NotificationThread.java:86)
	at org.scijava.java3d.NotificationThread.run(NotificationThread.java:104)
nFrames = 1

The bug report function shows:

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 10
  os.version => 10.0
  java.version => 1.8.0_65
  java.vendor => Oracle Corporation
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.8.0_65-b17
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 25.65-b01
  java.vm.vendor => Oracle Corporation
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.8
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Program Files\Java\jdk1.8.0_65/jre
  imagej.dir => C:\Users\offw\Desktop\image\Fiji.app

Hopefully, this info could give you some idea.
Thanks!
chin


#5

A very similar bug appears to have been fixed in JOGL. But I guess it is actually some other cause, since we ship 2.3.2 and this fix is included in that version.

Well, we need to produce a minimal test case to send to the JogAmp team, and/or investigate ourselves.

@chin @tinevez Does the “Test Java3D” plugin work on either system? If not, it is a pretty good minimal test case. Or if that plugin does work, we will need to start from the 3D Viewer’s constructed scene graph and start paring it down until we locate the culprit.


#6

Hi @ctrueden and @tinevez,
By using the steps " Plugins :arrow_forward: Utilities :arrow_forward: Debugging :arrow_forward: Test Java3D", the 3D Test window works on both nVidia 680x and AMD 290 graphic cards. And from the console shows “3D [dev] 1.6.0-scijava-2-pre11-daily-experimental daily”.


#7

Thanks for the quick follow-up. I will dig deeper when I am back in the office in January. If I am unable to reproduce on Windows machines locally, I may ask you and/or @tinevez to test a few different bits of Java 3D code to see which ones trigger the problems.


#8

I haven’t had time to investigate further yet, but for completeness: @imagejan also reported the createImpl ctx !ARB but ARB is used error as fiji/3D_Viewer#17.


#9

I ran the automatic update and now 3DViewer does not work nay more. Working on Mac OS 10.9.5, and Java is up to date. I tried Plugins/Utilities/Debugging/Test Java 3D and here is the error message below. Any idea how to proceed from here? Thx!!!

Exception in thread “J3D-Renderer-1” java.lang.NoClassDefFoundError: apple/awt/ComponentModel
at com.sun.opengl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo0(Native Method)
at com.sun.opengl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo(JAWT_DrawingSurface.java:56)
at com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable$1.run(MacOSXOnscreenGLDrawable.java:165)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable.lockSurface(MacOSXOnscreenGLDrawable.java:163)
at com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(MacOSXOnscreenGLContext.java:57)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
at javax.media.j3d.JoglPipeline$QueryCanvas.doQuery(JoglPipeline.java:9030)
at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8778)
at javax.media.j3d.Renderer.doWork(Renderer.java:495)
at javax.media.j3d.J3dThread.run(J3dThread.java:256)
Caused by: java.lang.ClassNotFoundException: apple.awt.ComponentModel
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 11 more


#10

Which version of Java does your ImageJ use? (Find out.)

If you are using Java 8: did you turn on the Java 8 update site?


#11

The status bar shows:

(Fiji is just) ImageJ 2.0.0-rc-43/1.50e; Java 1.8.0_66 [64-bit]; 16MB of 3703MB (<1%)

Java automatic update is turned on in OSX System Preferences/Java. It can’t be turned off.

thx


#12

OK, you are using Java 8. So if you want the 3D Viewer to work, you need to enable the Java-8 update site.

If you turn on the Java-8 update site and still get the error above, definitely let us know. But I would be surprised, since that error indicates a problem with the old version of Java 3D which is no longer used when the Java-8 update site enabled.


#13

Hi! I have the same error running 3D viewer on my laptop. Windows 7 x64, Radeon 7970m graphic card, Java 8, and the Java 8 update site is on. In Plugins->Utilities->Debugging the Marching Cubes test fails; but Java3D test works just fine.


#14

I also have this problem using windows 10 and Radeon 6670 with Java 8. Is there any solution? My console:

java.net.ConnectException: Connection refused: connect
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at net.imagej.updater.XMLFileDownloader.start(XMLFileDownloader.java:92)
at net.imagej.updater.FilesCollection.downloadIndexAndChecksum(FilesCollection.java:1147)
at net.imagej.ui.swing.updater.ImageJUpdater.run(ImageJUpdater.java:140)
at org.scijava.command.CommandModule.run(CommandModule.java:205)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2943)
at java.net.HttpURLConnection.getHeaderFieldDate(HttpURLConnection.java:552)
at java.net.URLConnection.getLastModified(URLConnection.java:559)
at net.imagej.updater.XMLFileDownloader.start(XMLFileDownloader.java:89)
… 11 more
3D [dev] 1.6.0-scijava-2-pre11-daily-experimental daily

com.jogamp.opengl.GLException: J3D-Renderer-1: createImpl ctx !ARB but ARB is used, profile > GL2 requested (OpenGL >= 3.1). Requested: GLProfile[GL4bc/GL4bc.hw], current: 1.1 (Compat profile, compat, hardware) - 1.1.0
at jogamp.opengl.windows.wgl.WindowsWGLContext.createImpl(WindowsWGLContext.java:404)
at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
at org.scijava.java3d.JoglPipeline.createNewContext(JoglPipeline.java:6412)
at org.scijava.java3d.Canvas3D.createNewContext(Canvas3D.java:4602)
at org.scijava.java3d.Canvas3D.createNewContext(Canvas3D.java:2376)
at org.scijava.java3d.Renderer.doWork(Renderer.java:881)
at org.scijava.java3d.J3dThread.run(J3dThread.java:271)
Exception occurred in RenderingErrorListener:
java.lang.RuntimeException
at ij3d.ImageWindow3D$ErrorListener.errorOccurred(ImageWindow3D.java:330)
at org.scijava.java3d.VirtualUniverse.notifyRenderingErrorListeners(VirtualUniverse.java:1198)
at org.scijava.java3d.NotificationThread.processNotifications(NotificationThread.java:86)
at org.scijava.java3d.NotificationThread.run(NotificationThread.java:104)
nFrames = 1


#15

Unfortunately, not yet. You can track the progress of any fixes by following these issues on GitHub:

I did some digging just now, and it might be a bug in JOGL; see JogAmp bug #1201.

P.S. The Connection refused: connect error was just transient (ImageJ update server was down), so that problem should not happen anymore.


#17

Hey, I am having the same issue, was wondering if there was a solution to this problem yet. Very similar problem, updated 3D viewer, console is grey, and error:

version = 1.5
Exception occurred in RenderingErrorListener:
java.lang.RuntimeException
at ij3d.ImageWindow3D$ErrorListener.errorOccurred(ImageWindow3D.java:330)
at javax.media.j3d.VirtualUniverse.notifyRenderingErrorListeners(VirtualUniverse.java:1329)
at javax.media.j3d.NotificationThread.processNotifications(NotificationThread.java:90)
at javax.media.j3d.NotificationThread.run(NotificationThread.java:107)
3D [dev] 1.6.0-scijava-2-pre11-daily-experimental daily


#18

This implies you are trying to use Java 8, but with the old Java 6 version of Fiji with Java 3D 1.5, which is incompatible with Java 8?

Please see:

In a nutshell: please try downloading a fresh version of Fiji from http://fiji.sc/#download


#19

I downloaded the updated version of ImageJ with Java 8, now when I open the 3D Viewer it opens fine, and I can import .stl objects. But when I add update sites, such as 3D ImageSuite and Funimage. Next time I open 3D Viewer it asks me to update Java3D, which when I do and restart Fiji, I am no longer able to access 3D Viewer.


#20

@az_ismail Then one of those update sites is incompatible with the new Java 3D. In particular, I know that 3D ImageJ Suite is still incompatible—see this forum thread for details.

If you need the 3D ImageJ Suite, you will need to stick to Java 6, until it is upgraded.


#21

Alright thanks :confused: this is really weird, because using the same version (Java6), it worked yesterday… But suddenly today I am getting errors.