B4J Library Updated JSSC.Jar

I fixed and recompiled the Native DLL for JSSC which was causing Access Violation crashes when attempting to open a serial port on Windows 10 64 bit systems with newer Java versions.

With Java 8 x64, it was hit and miss. One system crashed while another did not. x32 always worked of course.

With the recompiled DLL, everything works with all combinations. If however, you remove the USB serial device while it is open it will crash the JVM with the same Access Violation, but I never checked this behavior before as it may have been the same previously. Regardless, that is a small price to pay when everything works fine while its open.

Attached is a fixed jssc.jar. Put this in your Libraries folder and re-compile your App, or you can insert the DLL directly into your app's jar. Either way.

Also note that since the build is the same version number, you MUST go into your windows user profile folder and delete the cache .jssc folder. Java likes to use this instead of whats in the Jar!!!

ss1.png
 

Attachments

  • jssc.jar
    188.4 KB · Views: 860
Last edited:

Chris2

Active Member
Licensed User
Longtime User
Just in case it's never been confirmed before (I think the posts above are from a few days before the first Java 11 version of B4J was released); using techKnight's jssc.jar, jSerial is working with OpenJDK11 under Windows 10 64 bit.
 

Arnaud

Active Member
Licensed User
Longtime User
Hello,

I have ever the problme with jSerial and JDK11 under Windows 10 64 bit.


I have replace the file .jssc in my Libraries with the techKnight's jssc.jar but it don t work.

Can you help me please?

Thanks
 

Arnaud

Active Member
Licensed User
Longtime User
Hello,



1 -I have check the internal librairie, I have not the file jssc.jar.

2 - I have download the techKnight's jssc.jar, and i have put in the folder " Basic4j ---- AdditionnalLibrairies "

3 - Below the error message (I try to open the COM 7)



B4X:
Waiting for debugger to connect...
Program started.
(ArrayList) [COM3, COM4, COM5, COM7, COM8, COM9, COM11, COM12, COM13, COM14]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=3524, tid=18176
#
# JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13)
# Java VM: OpenJDK 64-Bit Server VM (11.0.1+13, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  0x000000007110b5db
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\ALFANO\APP\Windows J\APP\ALFANO 6\ALFANO 6 1.2.7\Objects\hs_err_pid3524.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.
#


thanks
 

Chris2

Active Member
Licensed User
Longtime User
That's certainly similar to the error I saw before this jssc.jar fixed it.
Have you followed the final instruction too?
Also note that since the build is the same version number, you MUST go into your windows user profile folder and delete the cache .jssc folder. Java likes to use this instead of whats in the Jar!!!

This refers to files in the C:\Users\'username'\.jssc\windows\ folder.
 

Arnaud

Active Member
Licensed User
Longtime User
Thanks Chris 2, it works fine now.

I was thinking that I must delete the file cache in java (picture in attachment)
 

Attachments

  • java folder.png
    java folder.png
    116.3 KB · Views: 626

sedega

New Member
Thank you so much! Works like a charm. I almost lost hope with this when recently updated to win10 from win7. (had no problems before) Very cool to find a fix from some random forum that actually works.
 
Top