Closed dBeker closed 6 years ago
The code looks good. Which release are you using and can you reproduce the error on small arrays or by replacing LZ4Factory.fastestInstance()
with LZ4Factory.fastestJavaInstance()
?
Please reopen this issue if you still need to fix it. Looks like it is a problem in the JVM.
My environment: PandaBoard-ES, Ubuntu server, OpenJDK 1.7 - ZeroVM
Issue: I've a large byte array containing 614400 elements (640 x 480 x 2) I want to compress it and the program is frozen. When I try to kill the task, I've :
OpenJDK Zero VM warning: Exception java.lang.NullPointerException occurred dispatching signal SIGINT to handler- the VM may need to be forcibly terminated
After a while, the program automatically terminates with the error below:
A fatal error has been detected by the Java Runtime Environment:
Internal Error (os_linux_zero.cpp:285), pid=923, tid=2379707504 fatal error: caught unhandled signal 11
JRE version: 7.0_25-b30 Java VM: OpenJDK Zero VM (22.0-b10 mixed mode linux-arm ) Derivative: IcedTea 2.3.10 Distribution: Ubuntu 12.04 LTS, package 7u25-2.3.10-1ubuntu0.12.04.2 Failed to write core dump. Core dumps have been disabled. To enable core umping, try "ulimit -c unlimited" before starting Java again
An error report file with more information is saved as: /home/db/Desktop/thesis_java/hs_err_pid923.log Segmentation fault
Here is my code block:
ShortBuffer buffer = depthMD.getData().createShortBuffer(); ByteBuffer bb = ByteBuffer.allocate(sb.capacity()*2); bb.asShortBuffer().put(sb); byte[] data = new byte[bb.capacity()]; bb.get(data); // Verified that I've a clean byte array data here.
LZ4Factory factory = LZ4Factory.fastestInstance(); int decompressedLength = data.length; LZ4Compressor compressor = factory.fastCompressor(); int maxCompressedLength = compressor.maxCompressedLength(decompressedLength); byte[] compressed = new byte[maxCompressedLength]; //Next line gives that error int compressedLength = compressor.compress(data, 0,decompressedLength, compressed, 0, maxCompressedLength); System.out.println(data.length);