Java 1.6 Segmentation fault 11 (OSX 10.7.4) - java

I have .jar file which during runtime reads one .dylib library which I compiled in OSX with GCC compiler.
Application runs without any problems on OSX 10.6.8.
Java version:
java version "1.6.0_33" Java(TM) SE Runtime Environment (build
1.6.0_33-b10-424-10M3720) Java HotSpot(TM) 64-Bit Server VM (build 20.8-b01-424, mixed mode)
GCC version:
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.1.00)
I use 64-bit Java and libs which .jar needs are compiled for x86_64. So, on Snow Leopard, everything runs fine.
I now switch my application to OSX 10.7.4. There I tried 2 different Java versions:
1st Java version (same as on Snow Leopard):
java version "1.6.0_33" Java(TM) SE Runtime Environment (build
1.6.0_33-b10-424-10M3720) Java HotSpot(TM) 64-Bit Server VM (build 20.8-b01-424, mixed mode)
2nd Java version (updated today):
java version "1.6.0_35" Java(TM) SE Runtime Environment (build
1.6.0_35-b10-428-11M3811) Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
GCC version:
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.9.00)
I first tried just to run application with .dylib compiled on Snow Leopard and I got this error:
Invalid memory access of location 0x0 rip=0x7fff894aa697 Segmentation fault: 11
And also new lines which didn't caused app to crash, but they don't show on Snow Leopard:
java[1366] <Error>: CGContextGetCTM: invalid context 0x0
java[1366] <Error>: CGContextSetBaseCTM: invalid context 0x0
java[1366] <Error>: CGContextGetCTM: invalid context 0x0
java[1366] <Error>: CGContextSetBaseCTM: invalid context 0x0
After this crash I tried to recompile dependency .dylib with GCC on Lion, but that changed nothing. I still get Segmentation fault: 11 error.
I read about this error on net and as far as I noticed it is very often on Lion since Java update may have messed something, but since I am not so familiar with Java - has anyone encountered these problems and if yes, is there a way to solve this?
Many thanks.
[edit #1: Attempt with Java 7 on OSX 10.7.4]
When running .jar with Java 7, crash occurs again, here's error report:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff894aa697, pid=1471, tid=31503
#
# JRE version: 7.0_07-b10
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.3-b01 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [CoreFoundation+0x2a697] CFSetGetValue+0x17
#
# 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:
# /Users/username/Desktop/executable/hs_err_pid1471.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abort trap: 6

With Mac OS X 10.8.2 and with Java 6 installation, problems disappeared. I was reading about this problem and read that there was some problems with Java 6 and Mac OS X 10.7.4. As far as I am concerned, I was just waiting to test application on 10.8.2 to check if it produces these errors only on 10.7.4 and it looks like those errors only occur on 10.7.4.
With an OS upgrade, problems are solved which is good enough answer for me in this case.
Best regards.

I ran into this today on OS X 10.8.2, so waiting for an update wasn't going to help. I was able to fix it by reinstalling Java for OS X.
I didn't bother trying to uninstall the messed up java, I just re-downloaded it an installed over it. This is the version I installed:
Java For OS X 10.8
If you're not on 10.8(Mountain Lion), then you probably need a different download. It can be found on the same site. Hopefully this helps someone.

Related

Serial port reading - Error : EXCEPTION_ACCESS_VIOLATION - C [rxtxSerial.dll+0x5b00]

Currently I'm trying to read serial port. Working fine in Linux. But facing error in Windows machine.
I followed this link to read serial port and Downloaded RXTX library from here for windows machine (JAR + DLL file).
OS : Windows 10 with 64bit
Java jre : Jre 1.8.0_261 VERSION.
Exception throws when read through input stream.
Error log :
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180005b00, pid=4508, tid=0x0000000000002b90
#
# JRE version: Java(TM) SE Runtime Environment (8.0_261-b12) (build 1.8.0_261-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [rxtxSerial.dll+0x5b00]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\user1\eclipse-workspace\serialport\hs_err_pid4508.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.
#
Suggessions will helpful for me. Thanks!
TL;DR: Do not use 1.8.0_261 use 1.8.0_251 instead
I tried to reproduce this error with 1.8.0_181, 1.8.0_251 and 1.8.0_261 using Windows 10.0 , 64 bit Build 18362 (10.0.18362.1082).
I could only reproduce this error with Jre 1.8.0_261. u181 and u251 worked fine for me. I would suggest to use java 8 u251 from https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html .
Serial port depending parts of the application I am working on failed today after the java update from 1.8.0_241 to 1.8.0_271. I think the problem could be the switch from Visual Studio 2010 to 2017 which Java 8 is build with now.
New Features:
➜ JDK/JRE Runtime Windows Visual Studio Library (DLL) Dependency Changes
Java 1.8.0_261 Release Notes
Update: I was on an quite old version(2017) of jssc(Java Simple Serial Connector). Unfortunately the original has no updates since a while. But I found a fork on GitHub which continues development. Whith the forked version I had no further issues!
I tested RXTX with the newer Java 8u281 release from 19 Jan. 2021 but it also crashes.
However AdoptOpenJDK 8u282 is working smoothly without any errors with the serial communication using RXTX and looks like it fully compatible with Oracle JDK!!! AdoptOpenJDK

Tomcat server automatically stopped in Eclipse

I am getting the below error.
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000070286c80, pid=496, tid=6672
JRE version: Java(TM) SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode windows- amd64 compressed oops)
Problematic frame:
V [jvm.dll+0x116c80]
Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
Please give the solution
In your logs, you have not the error dump because not enabled.
It looks like a bug of your JRE implementation.
You seem to use an OPEN JDK JRE implementation. If you can, try a more recent version of it or switch to an Oracle JDK/JRE implementation to check if the problem may be corrected.
Anyway, if you cannot change the version of your JDK, you can open a bug in the bug tracking site of OPEN JDK.
Failed to write core dump. Minidumps are not enabled by default on
client versions of Windows
I have two tracks :
check that you use Open JDK with a aligned version with the Open JRE.
In theory, it is not necessary but it may be a bug since you use a recent version.
No guarantee but you can try to enable it by adding the VM argument
-XX:+CreateMinidumpOnCrash in your eclipse.ini file such as :
-vmargs
-XX:+CreateMinidumpOnCrash-Xms256m
But don't duplicate the -vmargs in the file. You could have more details on the fatal error.

Access violation starting Tomcat from Eclipse

When I try to start Server Tomcat 8 in Eclipse, I have this error:
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd233a2bbd,
pid=6852, tid=3720 JRE version: Java(TM) SE Runtime Environment
(8.0_66-b18) (build 1.8.0_66-b18) Java VM: Java HotSpot(TM) 64-Bit
Server VM (25.66-b18 mixed mode windows-amd64 compressed oops)
Problematic frame: C [WS2_32.dll+0x2bbd]
It failed to write a core dump, and minidumps are not enabled by default on client versions of Windows.
What is the reason? How to fix it?
You need to have Eclipse, Eclipse Tomcat plugin (Server connector), Java used for the Tomcat in same JVM arhitecture. Either 32 or 64 bit.
Check server connector settings in: Window/Preferences/Server/Runtime environments/Edit. For the java version, be sure that you download 32 bit Eclipse.
In the past I found that Java 32, Eclipse 32 and 32 bit plugins have lesser bugs and in general work more stable than their 64 bit part.
I see no problem if you develop on 32 bit platform, and in production you have of course 64 bit platform.

JDK 8 update 66 fatal error for JavaFx application on Windows 10

I'm making a JavaFx app. Today I integrated a login panel and a registration panel to it. After integrating those, I started getting a fatal error whenever I ran the app which didn't happen earlier. The log of the error is as follows:
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) at pc=0x000007feec5d5c01, pid=5552, tid=4252
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 windows-amd64 compressed oops)
Problematic frame:
C [msvcr120.dll+0x95c01]
Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
OS: Windows 10 (64 bit)Java: JDK 8u66IDE: Netbeans 8.0.1
I also ran the app on a system with Ubuntu 14.04 64 bit (JDK 8u77 and Netbeans 8.0.2) and the app ran fine without any fatal errors (or any errors).
The thing that I want to know is that, is it a development issue or a JVM issue? Should I just raise an issue and continue with JDK 8u77?
This is an issue in Java, which is being looked into - https://bugs.openjdk.java.net/browse/JDK-8157447

Eclipse juno giving error in Suse 64bit

I have downloaded the new eclipse juno and jdk 7. But It is giving error while starting. Here is the ERROR.
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00002b6312df9c6a, pid=1648, tid=1074792768
JRE version: 7.0_05-b06
Java VM: Java HotSpot(TM) 64-Bit Server VM (23.1-b03 mixed mode linux-amd64 compressed oops)
Problematic frame:
C [libc.so.6+0x75c6a] _wordcopy_fwd_aligned+0x3a
Failed to write core dump. en disabCore dumps have beled. To enable core dumping, try "ulimit -c unlimited" before starting Java again.
An error report file with more information is saved as:
/home/jeshwanth/tools/eclipse/hs_err_pid1648.log.
Please help.
Thanks.
Seems to be related to:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335086
Try not to use the "Browse" button when choosing a workspace but type in the path to the workspace directly.
Had the same problem solved by avoiding the "Browse" button.
You should also need to install Java SE Runtime Environment 7 (JRE 7 (64 bit)) form oracle.com. And also check your eclipse juno is 64 bit version for linux.

Categories

Resources