java - rxtx fatal EXCEPTION_ACCESS_VIOLATION -



java - rxtx fatal EXCEPTION_ACCESS_VIOLATION -

i'm having problem rxtx library. trying add together back upwards project reading/writing multiple serial ports @ time, , started receiving next message @ runtime.

# fatal error has been detected java runtime environment: # # exception_access_violation (0xc0000005) @ pc=0x00000001800071cd, pid=9032, tid=5016 # # jre version: java(tm) se runtime environment (7.0_51-b13) (build 1.7.0_51-b13) # java vm: java hotspot(tm) 64-bit server vm (24.51-b03 mixed mode windows-amd64 compressed oops) # problematic frame: # c [rxtxserial.dll+0x71cd] # # failed write core dump. minidumps not enabled default on client versions of windows # # error study file more info saved as: # c:\users\jack\workspace\testproject\hs_err_pid9032.log # # if submit bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # crash happened outside java virtual machine in native code. # see problematic frame study bug. #

i've been able isolate code produces crash, , hoping provide explanation why it's happening, and/or perhaps verify indeed expected behavior of rxtx (and not result of misconfiguration of setup. rxtx complain mismatch between native-lib , jar everytime. native-lib 2.2pre2 , jar version 2.1-7, i've ignored no apparent sick impact far)

the simplest code produces error:

public static void main(string[] args) throws exception { commportidentifier com13pi = commportidentifier .getportidentifier("com13"); commportidentifier com1pi = commportidentifier .getportidentifier("com1"); serialport com13 = (serialport) com13pi.open(main.class.getname(), 400); serialport com1 = (serialport) com1pi.open(main.class.getname(), 400); com13.close(); //com1.close(); com13pi = commportidentifier.getportidentifier("com13"); com13 = (serialport) com13pi.open(main.class.getname(), 400); }

the crucial line 'com1.close()' commented out. when uncommented, code works fine. in it's current form, produces aforementioned exception.

the documentation rxtx lacking, can't tell if expected behavior or not. however, ability open , close 1 serial port, while remains open seems crop when using rxtx library, seems bit shocking if unfixed bug in rxtx. if rxtx installed test code , study results, or provide explanation, i'd appreciate it.

i don't have serial modem me, recall having similar problem.

first, check if there exceptions around com1.close(). if ioexception because stream still has content , stuck. happens if there consumer on stream nil got processed. think pipes in linux find . | yourscript yourscript not consuming find . generated.

you should able open , close ports, imho rxtx fickle , works fine when things don't alter much around it.

java windows rxtx

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -