原因:
在window下开发的串口操作项目,在CentOS7环境报错。报错的顺序是可以打开串口,但是在向串口发送指令的时候,直接退出了。
以下错误信息:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f2dea0fe5da, pid=25356, tid=0x00007f2e36c44700
#
# JRE version: OpenJDK Runtime Environment (8.0_262-b10) (build 1.8.0_262-b10)
# Java VM: OpenJDK 64-Bit Server VM (25.262-b10 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [librxtxSerial.so+0x75da] Java_gnu_io_RXTXPort_nativeDrain+0xea
#
# Core dump written. Default location: /usr/local/back/core or core.25356
#
# 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.
关注一点:[librxtxSerial.so+0x75da] Java_gnu_io_RXTXPort_nativeDrain+0xea
解决:
此问题产生的原因是librxtxSerial.so包的版本所致。在Windows和Linux版本应该使用不同的.so包,所有到网站:http://fizzed.com/oss/rxtx-for-java下载适合的版本即可解决。
每天提高一点点!
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有