# A fatal error has been detected by the Java Runtime Environment:## SIGSEGV (0xb) at pc=0x00007f3cb30d071f, pid=5313, tid=139898936805120## JRE version: Java(TM) SE Runtime Environment (8.0_72-b15) (build 1.8.0_72-b15)# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.72-b15 mixed mode linux-amd64 compressed oops)# Problematic frame:# C [libusb4java.so+0x1c71f] libusb_submit_transfer+0x1ef## Core dump written. Default location: /tmp/core or core.5313## An error report file with more information is saved as:# /tmp/hs_err_pid5313.log
--------------- T H R E A D ---------------
Current thread (0x00007f3ceb14b000): JavaThread "printManagerExecutorService-1" [_thread_in_native, id=5505, stack(0x00007f3cc25ec000,0x00007f3cc26ed000)]siginfo: si_signo: 11 (SIGSEGV), si_code: 2 (SEGV_ACCERR), si_addr: 0x00007f3d003b0010
Stack: [0x00007f3cc25ec000,0x00007f3cc26ed000], sp=0x00007f3cc26e9720, free space=1013kNative frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)C [libusb4java.so+0x1c71f] libusb_submit_transfer+0x1efJava frames: (J=compiled Java code, j=interpreted, Vv=VM code)j org.usb4java.LibUsb.bulkTransfer(Lorg/usb4java/DeviceHandle;BLjava/nio/ByteBuffer;Ljava/nio/IntBuffer;J)I+0j com.company.connections.usb.UsbConnection.sendData([B)V+69
USB4Java 1.2.0java -versionjava version "1.8.0_72"Java(TM) SE Runtime Environment (build 1.8.0_72-b15)Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 6.7 (Santiago)
public static DeviceHandle createDeviceHandle(Device device) throws LibUsbException {
DeviceHandle handle = new DeviceHandle();
if(device != null){
int result = LibUsb.open(device, handle); // <=== RIGHT HERE
if (result != LibUsb.SUCCESS) {
throw new LibUsbException("Unable to open USB device", result);
}
} else {
LOG.error("Unable to create a USB device handle because no device was specified.");
}
return handle;
}try {
ByteBuffer buffer = ByteBuffer.allocateDirect(data.length);
buffer.put(data);
IntBuffer transfered = IntBuffer.allocate(1);
int result = LibUsb.bulkTransfer(handle, endpoint, buffer, transfered, connTimeout); // <=== RIGHT HERE
if (result != LibUsb.SUCCESS) {
throw new LibUsbException("Bulk transfer failed", result);
}
} catch (LibUsbException e) {
String detailMsg = "Failed to send data to device: " + usbConnectionData.getDisplayName() + ". Error: "+ e.getLocalizedMessage();
LOG.error(detailMsg);
}public static void destroyDeviceHandle(Usb4JavaConnectionData connData){
if(connData.getHandle() != null){
LibUsb.close(connData.getHandle()); }
connData.setHandle(null);
}