Serial port reading – Error : EXCEPTION_ACCESS_VIOLATION – C [rxtxSerial.dll+0x5b00]

huangapple go评论111阅读模式
英文:

Serial port reading - Error : EXCEPTION_ACCESS_VIOLATION - C [rxtxSerial.dll+0x5b00]

问题

I'm currently trying to read a serial port. It's working fine on Linux, but I'm encountering an error on a Windows machine.

I followed this link to read the serial port and downloaded the RXTX library from here for the Windows machine (JAR + DLL files).

Operating System: Windows 10 64-bit

Java JRE: JRE 1.8.0_261 VERSION.

An exception is thrown when reading through the input stream.

Error Log:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180005b00, pid=4508, tid=0x0000000000002b90
#
# JRE version: Java(TM) SE Runtime Environment (8.0_261-b12) (build 1.8.0_261-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [rxtxSerial.dll+0x5b00]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\user1\eclipse-workspace\serialport\hs_err_pid4508.log
#
# 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.
#

Suggestions would be helpful for me. Thanks!

英文:

Currently I'm trying to read serial port. Working fine in Linux. But facing error in Windows machine.

I followed this link to read serial port and Downloaded RXTX library from here for windows machine (JAR + DLL file).

OS : Windows 10 with 64bit

Java jre : Jre 1.8.0_261 VERSION.

Exception throws when read through input stream.

Error log :

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180005b00, pid=4508, tid=0x0000000000002b90
#
# JRE version: Java(TM) SE Runtime Environment (8.0_261-b12) (build 1.8.0_261-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [rxtxSerial.dll+0x5b00]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\user1\eclipse-workspace\serialport\hs_err_pid4508.log
#
# 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.
#

Suggessions will helpful for me. Thanks!

答案1

得分: 3

不要使用1.8.0_261,而是使用1.8.0_251。我尝试在Windows 10.0,64位Build 18362(10.0.18362.1082)上使用1.8.0_181、1.8.0_251和1.8.0_261来复现此错误。

我只能在Jre 1.8.0_261上复现此错误。u181和u251对我来说都正常工作。我建议使用来自https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html 的Java 8 u251。

英文:

TL;DR: Do not use 1.8.0_261 use 1.8.0_251 instead

I tried to reproduce this error with 1.8.0_181, 1.8.0_251 and 1.8.0_261 using Windows 10.0 , 64 bit Build 18362 (10.0.18362.1082).

I could only reproduce this error with Jre 1.8.0_261. u181 and u251 worked fine for me. I would suggest to use java 8 u251 from https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html .

答案2

得分: 1

串口依赖部分的应用程序在从1.8.0_241升级到1.8.0_271的Java更新后出现故障。我认为问题可能是从Visual Studio 2010切换到现在使用的Java 8构建的2017版本引起的。

新功能:

➜ JDK/JRE运行时Windows Visual Studio库(DLL)依赖项更改

Java 1.8.0_261发布说明

更新:我使用的jssc(Java简单串口连接器)版本相当旧(2017年)。不幸的是,原始版本已经有一段时间没有更新了。但我找到了一个GitHub上的分支,它继续开发。使用这个分支版本后,我没有进一步的问题!

英文:

Serial port depending parts of the application I am working on failed today after the java update from 1.8.0_241 to 1.8.0_271. I think the problem could be the switch from Visual Studio 2010 to 2017 which Java 8 is build with now.

>New Features:
>>➜ JDK/JRE Runtime Windows Visual Studio Library (DLL) Dependency Changes

Java 1.8.0_261 Release Notes

Update: I was on an quite old version(2017) of jssc(Java Simple Serial Connector). Unfortunately the original has no updates since a while. But I found a fork on GitHub which continues development. Whith the forked version I had no further issues!

答案3

得分: 0

我测试了 RXTX 与较新的 Java 8u281 版本,日期为 2021 年 1 月 19 日,但它也崩溃了。

然而,AdoptOpenJDK 8u282 在使用 RXTX 进行串行通信时运行得非常顺畅,没有任何错误,看起来它与 Oracle JDK 完全兼容!!! AdoptOpenJDK

英文:

I tested RXTX with the newer Java 8u281 release from 19 Jan. 2021 but it also crashes.

However AdoptOpenJDK 8u282 is working smoothly without any errors with the serial communication using RXTX and looks like it fully compatible with Oracle JDK!!! AdoptOpenJDK

huangapple
  • 本文由 发表于 2020年7月30日 00:13:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/63157940.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定