Resizing the 3D Viewer results in segfault in ubuntu 16.04 with java 8 and j3d 1.6

Can email the .log file if desired.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f8d2783d4fa, pid=28750, tid=140244286723840
#
# 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  [i965_dri.so+0x3bb4fa]
#
# 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/albert/Programming/fiji-new/Fiji.app/hs_err_pid28750.log
[thread 140244212029184 also had an error]
#
# 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)

This is discussed in fiji/3D_Viewer#15.

I am curious: if you set sun.java2d.noddraw to false, does it fix this problem? It fixes some possibly related problems at least on Windows. Note that to test it, you would need to use ImageJ-linux64 --dry-run and then tweak the output, rather than simply passing the flag; see this GitHub comment from aschain. I know DirectDraw is obviously a Windows thing, so it seems intuitively unlikely to matter, but… no harm in checking.

Edit: The launcher only passed that property on Windows. So even if this somehow affected things on macOS and Linux, you can simply pass -Dsun.java2d.noddraw=false directly as a launcher parameter. I tested on macOS, and unsurprisingly it makes no difference.

I still think the macOS bug (exception) and Linux bug (JVM crash) may be related.

I notice that you are using 1.8.0_66. Have you tested with the newest Java 8? That might fix the problem.

A newer java has the same issue, even when launched with “-Dsun.java2d.noddraw=false --”

$ java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

cd Fiji.app/ Fiji.app mv java/linux-amd64/jdk1.8.0_66 .
Fiji.app$ ./ImageJ-linux64 -Dsun.java2d.noddraw=false –
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
OpenJDK 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=0x00007f8e19fb54fa, pid=11443, tid=0x00007f8e18b7b700
#
# JRE version: OpenJDK Runtime Environment (8.0_121-b13) (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
# Java VM: OpenJDK 64-Bit Server VM (25.121-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [i965_dri.so+0x3bb4fa]
#
# 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/albert/Programming/fiji-new/Fiji.app/hs_err_pid11443.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)

Thanks for testing it, @albertcardona.