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