fiji / 3D_Viewer

https://imagej.net/plugins/3d-viewer
GNU General Public License v3.0
19 stars 18 forks source link

Segfault on Ubuntu 17.10 #21

Open axtimwalde opened 6 years ago

axtimwalde commented 6 years ago

As soon as the plugin attempts to create a 3D viewer window, the JVM crashes with

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
3D [dev] 1.6.0-scijava-2-pre11-daily-experimental daily

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fcd8a239f88, pid=25237, tid=140519520167680
#
# JRE version: Java(TM) SE Runtime Environment (8.0_66-b17) (build 1.8.0_66-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.66-b17 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libawt_xawt.so+0x41f88]  ReadRegionsInList+0x3b8
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/saalfeld/hs_err_pid25237.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
ctrueden commented 6 years ago

A couple more data points:

ctrueden commented 6 years ago

This thread may also be related, since the stack frame is the same. This issue is likely caused by Wayland.

axtimwalde commented 6 years ago

On X11, the window remains empty and the console reports this

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
3D [dev] 1.6.0-scijava-2-pre11-daily-experimental daily

libEGL warning: DRI2: failed to authenticate
com.jogamp.opengl.GLException: J3D-Renderer-1: createImpl ARB n/a but required, profile > GL2 requested (OpenGL >= 3.1). Requested: GLProfile[GL3bc/GL3bc.sw], current: 3.0 (Compat profile, compat[ES2], FBO, software) - 3.0 Mesa 17.4.0-devel (git-2b612431f5 2017-10-28 xenial-oibaf-ppa)
    at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:440)
    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)
J3dI18N: Error looking up: Renderer7
Exception occurred in RenderingErrorListener:
java.lang.RuntimeException
    at ij3d.ImageWindow3D$ErrorListener.errorOccurred(ImageWindow3D.java:351)
    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
ctrueden commented 6 years ago

@ScienceToolkit This is the thing I wanted to test on your Ubuntu 18.04 system earlier today. It is actually the current 3D Viewer plugin, not the new SciView plugin.

Testing will be as simple as launching Fiji, opening T1 Head (File ▶ Open Samples ▶ T1 Head), running Plugins ▶ 3D Viewer, and clicking OK to the dialog box. If the 3D head rendering appears, then it appears the issue was resolved.

ctrueden commented 6 years ago

@axtimwalde I notice that your stack trace indicates Java 1.8.0_66. Would be worth testing on 1.8.0_172, and maybe on Java 10, to see if that makes a difference. And of course you could now upgrade to 18.04 LTS if you feel adventurous and/or fed-up with 17.10.

axtimwalde commented 6 years ago

@ctrueden on 18.04:

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

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f9d295171d8, pid=26932, tid=0x00007f9cb4e89700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_172-b11) (build 1.8.0_172-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.172-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libawt_xawt.so+0x421d8]  ReadRegionsInList+0x3b8
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/saalfeld/hs_err_pid26932.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
ctrueden commented 6 years ago

Thanks @axtimwalde! 😿 to see it's not fixed yet.

ScienceToolkit commented 6 years ago

@ctrueden I ran your test with the T1 Head and it rendered fine on my machine. No errors.

ctrueden commented 6 years ago

@ScienceToolkit Interesting! I wonder if it is some hardware difference between your machine and @axtimwalde's. Or are you using Ubuntu with Xorg instead of Wayland? What does echo $XDG_SESSION_TYPE say?

ScienceToolkit commented 6 years ago

@ctrueden I am using Xorg (18.04 default). Running bash echo $XDG_SESSION_TYPE gives me x11.

ctrueden commented 6 years ago

@ScienceToolkit Aha, OK, so all still makes sense. The bug happens with Wayland, and it has not yet been resolved. @axtimwalde May be worth reporting upstream, if you can figure out where+how to do so.

melloware commented 3 years ago

Just ran into this issue today.

melloware commented 3 years ago

I just downloaded the latest native glue libs from here: https://jogamp.org/deployment/v2.4.0-rc-20210111/jar/

And they seem to work!