我正在尝试使用Ubuntu 14.04(x64)上的rxtx库(https://github.com/rxtx/rxtx)从串口读取数据。我有简单的java applet构建和在java 1.6上运行(尝试使用相同结果的1.8)。
当听众想要阅读输入时,它会因以下错误而崩溃。
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyUSB0
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f90ac2e2462, pid=6721, tid=140259339552512
#
# JRE version: 6.0_45-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [librxtxSerial.so+0x6462] long double restrict+0x52
#
# An error report file with more information is saved as:
# /home/etxzay/IdeaProjects/Solenoid/hs_err_pid6721.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Experimental: JNI_OnLoad called.
Process finished with exit code 134
看起来它是一种原生的RXTX库(librxtxSerial.so)问题。非常感谢任何帮助。