VTK + Java + MacOS, awt error

Hello again. In my quest to “get back into VTK shape” I’ve been trying to build/run VTK in various configurations to learn what’s changed since I’ve last used the API.
One issue that I’ve run into, is that I get some strange error from awt when running on mac.

# A fatal error has been detected by the Java Runtime Environment:
#  SIGSEGV (0xb) at pc=0x000000012f2e8f75, pid=68257, tid=0x000000000000a303
# JRE version: OpenJDK Runtime Environment (8.0_282-b08) (build 1.8.0_282-b08)
# Java VM: OpenJDK 64-Bit Server VM (25.282-b08 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# **C  [libawt_lwawt.dylib+0x44f75]  JNI_OnLoad+0xa0**
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
# If you would like to submit a bug report, please visit:
#   https://github.com/AdoptOpenJDK/openjdk-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

I’ve seen various posts about problems with Mac+Java+VTK but what I can’t find is a definitive solution for developing on Mac with Java bindings.
To try to simplify things, I’m currently not interested in rendering, I just want to read a vtkDataObject (vtk,vtp,vtu,vti,vtm etc) possibly transform the data via some filters, and then query information about the results (geometry with properties). So here are my questions:

  1. Are there some instructions for building Java wrappers (OpenJDK 8 or greater) + Mac (11.2.3) + VTK (9.*)?
  2. What is a minimum configuration for building VTK without rendering (no GL, no Mesa, no RayTracing)?

Thanks for any advice here.

Can you skim through #17831 to see if it has any connection to the error? Unfortunately I can’t give details on doing a vtk-java build on macOS, it’s been way too long since I’ve done one myself, but hopefully someone else on the list can fill in the details.

Hey David…thanks for the pointer…I don’t think that was my issue however, I was certainly playing whack-a-mole trying to figure something out here. One detail I left out here was that I was running all this from my IDE, which has worked for me in the past with python(PyCharm). My setup, in this case, was with IntelliJ and I was trying to invoke this from a unit test (JUnit framework). That was failing horribly. I eventually just made a main class and voila, everything worked. So I’m assuming, the framework wasn’t loading up awt and friends properly or something along those lines when spinning up the unit test. :man_shrugging:

As I said, I’m not sure where exactly I landed because I rebuilt vtk with varying configurations while trying to figure this out but I do believe the real problem was with the unit test setup…Seems like a problem for another day. Thanks again