0

Recently i updated my MacBook to Ventura coming from Big Sur and i'm having an error with the JVM when trying to start a java 8 project from eclipse. It was working fine on Big Sur. These problems below started showing up after the update.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ff811489d8b, pid=20099, tid=0x0000000000000103
#
# JRE version: Java(TM) SE Runtime Environment (8.0_371) (build 1.8.0_371-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.371-b11 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libobjc.A.dylib+0x1ad8b]  -[NSObject superclass]+0x11
#
# 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:
# /Applications/Eclipse.app/Contents/MacOS/hs_err_pid20099.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.
#

From oracle's documentation i found out that the C before the frame [libobjc.A.dylib+0x1ad8b] -[NSObject superclass]+0x11 indicates it is a native code error.

And when i added the -Xcheck:jni VM argument i started seeing these warnings in the logs

WARNING: JNI local refs: 385, exceeds capacity: 33
WARNING: JNI local refs: 385, exceeds capacity: 33
WARNING: JNI local refs: 385, exceeds capacity: 33

I don't know if this something critical or not. But i tried different types of JDK 8 and the problem still persists.

Right after this crash a ticket to Apple is automatically submitted including this information

Java quit unexpectedly

Here is the hs_err_pid20099.log log created by eclipse

Logs

Thanks in advance.

Jim Garrison
  • 85,615
  • 20
  • 155
  • 190
  • The `hs_err_pid20099.log` is created by the crashed Java VM, not by Eclipse. In the launch configuration hit the _Show Command Line_ button and run it on the command line outside of Eclipse. Probably you will get the same. If so, does reinstalling the Oracle or [a Java 8 JRE or JDK from a different vendor](https://adoptium.net/marketplace/?version=8) work? – howlger May 10 '23 at 15:31
  • @howlger Thanks for the response, i tried from the command line but it didn't work too. I have also tried different versions of the JDK like Oracle, temurin, and adoptopenjdk and all of them are giving the same error. – Mahmoud Mansour May 11 '23 at 07:28
  • Your code or a dependency uses a native library (*.so file) which seems to be broken by updating macOS. The solution might be updating the dependency containing the native library as well. Otherwise, make sure it has been reported to the library vendor. – howlger May 11 '23 at 08:45
  • Reinstall latest version of java 8. – Thorbjørn Ravn Andersen May 11 '23 at 19:56
  • @ThorbjørnRavnAndersen According to the error message not the Java VM itself crashes, but a native library in `libobjc.A.dylib` (_"The crash happened outside the Java Virtual Machine in native code."_). I overlooked this in my first comment as well. – howlger May 12 '23 at 06:15
  • @howlger it is still most likely triggered by a bug in the JVM which may have been found and fixed by now. – Thorbjørn Ravn Andersen May 12 '23 at 07:09
  • I got it fixed by adding the -nosplash command to the program arguments as in the accepted answer below. I don't know if this is macOS specific or it has to do with an eclipse splash screen or something. If anyone knows more information about this command it would be great. – Mahmoud Mansour May 12 '23 at 21:18

1 Answers1

0

The issue was resolved by adding the command -nosplash to the program arguments in the launch configuration as suggested by Till Brychcy on this eclipse bug thread.

  • So this issue is about launching a Java application which uses SWT, a pretty old version of SWT according to your log (`libswt-pi-cocoa-4530.jnilib` instead of [`libswt-pi-cocoa-4960r6.jnilib`](https://github.com/eclipse-platform/eclipse.platform.swt.binaries/tree/master/bundles/org.eclipse.swt.cocoa.macosx.x86_64)). Wouldn't it be better to update your dependencies instead of using this `-nosplash` workaround? – howlger May 13 '23 at 10:39