[Rxtx] Bug 144
John Coffey
johnco3 at gmail.com
Tue Aug 10 23:01:15 MDT 2010
Adrian,
that's a good idea - the rxtx code hasn't really moved forward for ages,
incidentally, I found the source description for the im-uart-disconnect
patch.
http://mailman.qbang.org/2009-September/6401378.html
Now that I recall, I think that was applied to the mainline code. The patch
(available in the archives is 77k) and requires the use of a
separate PortAlreadyClosedException. I have found this code to be very
stable for the past year or so and I've deployed it on linux, win32, win64 &
partially macosx.
John
On Tue, Aug 10, 2010 at 11:53 PM, Adrian Crum <adrian.crum at yahoo.com> wrote:
> John,
>
> The version warning is normal for the repo code. Thanks for giving it a try
> - your input helps.
>
> The thread-safe code is not finished. I'm trying to submit it in digestible
> pieces because I know a complete rewrite would not be considered.
>
>
> -Adrian
>
> --- On *Tue, 8/10/10, John Coffey <johnco3 at gmail.com>* wrote:
>
>
> From: John Coffey <johnco3 at gmail.com>
>
> Subject: Re: [Rxtx] Bug 144
> To: rxtx at qbang.org
> Date: Tuesday, August 10, 2010, 8:36 PM
>
>
> Adrian,
>
> I built x64 & x32 with all your patches
>
> - rxtx-devel_4.patch
> - rxtx-devel_5.patch
> - bug-144.patch
>
> - so far so good, however I'm getting the error when I initialize rxtx:
>
> *WARNING: RXTX Version mismatch*
> * Jar version = RXTX-2.2*
> * native lib Version = RXTX-2.2pre2*
> *
> *
> I remember this warning from some time ago, it looks like it was never
> fixed in the main development branch (which is 2.1.7 right? rather than 2.2.
> I have no idea where the 2.2 code has gone - the 2.1 vs 2.2 branches are an
> enigma to me). I went to RXTX-2.2pre2 when it became available to me as it
> supported a much wider set of baud rates for some special hardware where
> 2.1.7 used to throw some sort of error. Besides hand coding the termios.c
> open code (with a larger input buffer size), I also incorporated a 2.2
> patch (im-uart-disconnect-1.patch) from some other developer in the rxtx
> forum (sorry, i don't recall who deserves the credit for that patch). The
> patch addressed uart disconnects (which seem similar to the kinds of things
> you are trying to address), I don't think the aforementioned patch made its
> way into the repository. Anyways the 2.2 code with these patches seemed to
> be quite stable.
>
> I thought I'd give the latest/greatest set of patches you have been putting
> together against the mainline via a virtual serial port, however I
> encountered the following exception occasionally.
>
> Hope this is of some help and I wish it was easier to sort this mess out :)
>
> John
>
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fef20d5b4a,
> pid=4720, tid=3836
> #
> # JRE version: 6.0_20-b02
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01 mixed mode
> windows-amd64 )
> # Problematic frame:
> # C [rxtxSerial.dll+0x5b4a]
> #
> # An error report file with more information is saved as:
> # C:\Users\jcoffey\main\javacode\panels\PanelMonitor\hs_err_pid4720.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.
> get_java_var: invalid file descriptor
> # See problematic frame for where to report the bug.
> driver_has_tiocgicount: ioctl failed!
>
> On Tue, Aug 10, 2010 at 4:52 PM, Adrian Crum <adrian.crum at yahoo.com<http://mc/compose?to=adrian.crum@yahoo.com>
> > wrote:
>
> Attached is the updated Bug 144 patch. I had to add a way to stop the
> monitor thread when an I/O error occurred, otherwise the thread would spew
> error messages until to whole process was shut down.
>
> -Adrian
>
> --- On Mon, 8/9/10, Adrian Crum <adrian.crum at yahoo.com<http://mc/compose?to=adrian.crum@yahoo.com>>
> wrote:
>
> > From: Adrian Crum <adrian.crum at yahoo.com<http://mc/compose?to=adrian.crum@yahoo.com>
> >
> > Subject: Re: [Rxtx] Bug 144
> > To: rxtx at qbang.org <http://mc/compose?to=rxtx@qbang.org>
> > Date: Monday, August 9, 2010, 10:18 PM
> > I lied. The Bug 144 patch works -
> > disconnecting a serial cable no longer crashes the JRE. But
> > the rest of RxTx doesn't recover very well. I will be
> > working on making the code a little more fault tolerant.
> >
> > -Adrian
> >
> >
> > --- On Mon, 8/9/10, Adrian Crum <adrian.crum at yahoo.com<http://mc/compose?to=adrian.crum@yahoo.com>
> >
> > wrote:
> >
> > > From: Adrian Crum <adrian.crum at yahoo.com<http://mc/compose?to=adrian.crum@yahoo.com>
> >
> > > Subject: [Rxtx] Bug 144
> > > To: rxtx at qbang.org <http://mc/compose?to=rxtx@qbang.org>
> > > Date: Monday, August 9, 2010, 4:00 PM
> > > I tried out the patch in Bug 144 -
> > > JRE crashing when a serial connection is broken. The
> > patch
> > > doesn't fix the problem for me. I'm using Windows XP
> > and an
> > > ethernet device that is mapped to a COM port.
> > >
> > > Looking at the C code, I'm thinking overlapped I/O is
> > not a
> > > good approach. But I see comments in the code that
> > say
> > > overlapped I/O was needed to avoid system hangs.
> > Could
> > > someone get me up to speed on what those issues were?
> > >
> > > -Adrian
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Rxtx mailing list
> > > Rxtx at qbang.org <http://mc/compose?to=Rxtx@qbang.org>
> > > http://mailman.qbang.org/mailman/listinfo/rxtx
> > >
> >
> >
> >
> > _______________________________________________
> > Rxtx mailing list
> > Rxtx at qbang.org <http://mc/compose?to=Rxtx@qbang.org>
> > http://mailman.qbang.org/mailman/listinfo/rxtx
> >
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org <http://mc/compose?to=Rxtx@qbang.org>
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
>
>
> -----Inline Attachment Follows-----
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org <http://mc/compose?to=Rxtx@qbang.org>
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qbang.org/pipermail/rxtx/attachments/20100811/a7e10f9d/attachment-0740.htm>
More information about the Rxtx
mailing list