简单使用还不会出现问题,我开了个循环一直使用RXTXcomm重启短信猫设备,重启几次后,JVM就崩溃了。(WIN7、JDK11 64、使用的组件有:RXTXcomm、smslib-3.5.4 )
下面是报错日志:
# A fatal error has been detected by the Java Runtime Environment:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180008790, pid=8532, tid=7580
# JRE version: Java(TM) SE Runtime Environment (11.0.2+9) (build 11.0.2+9-LTS)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j gnu.io.RXTXPort.open(Ljava/lang/String;)I+0
j gnu.io.RXTXPort.<init>(Ljava/lang/String;)V+125
J 13956 c1 gnu.io.RXTXCommDriver.getCommPort(Ljava/lang/String;I)Lgnu/io/CommPort; (97 bytes) @ 0x000000000c508b54 [0x000000000c5082e0+0x0000000000000874]
J 13955 c1 gnu.io.CommPortIdentifier.open(Ljava/lang/String;I)Lgnu/io/CommPort; (293 bytes) @ 0x000000000c5a86cc [0x000000000c5a7fe0+0x00000000000006ec]
j jdk.internal.reflect.GeneratedMethodAccessor143.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+122
J 3630 c2 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@11.0.2 (65 bytes) @ 0x0000000012a4cf2c [0x0000000012a4ce60+0x00000000000000cc]
j org.smslib.helper.CommPortIdentifier.open(Ljava/lang/String;I)Lorg/smslib/helper/SerialPort;+53
j org.smslib.modem.SerialModemDriver.connectPort()V+129
j org.smslib.modem.AModemDriver.connect()V+8
j org.smslib.modem.ModemGateway.startGateway()V+45
j org.smslib.Service$1Starter.run()V+4
v ~StubRoutines::call_stub