B4J Question Serial port demo crashes

Zlgo

Member
Serial port demo(from this forum B4J_Chat) crashes on windows 10 with Java version "10.0.1" 2018-04-17.(Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)) and jserial.lib 1.2

Is it problem in new version of java or Windows?
Thanks!

Waiting for debugger to connect...
Program started.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=5452, tid=1868
#
# JRE version: Java(TM) SE Runtime Environment (10.0.1+10) (build 10.0.1+10)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0.1+10, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C [jSSC-2.8_x86_64.dll+0xb5db]
#
# 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:\APLIKACIJE\BJ4\Serijski port\Objects\hs_err_pid5452.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.
#
 

Zlgo

Member
It will probably work with the 32 bit Java.
What i can see on Oracle site downloads, under Java SE Development Kit 10.0.2 there is no option for 32bit , only windows 64bit.
It looks like only option is to wait for resolving bug (some compatibility if I understand well) in JSSC lib.
 

Zlgo

Member
https://www.b4x.com/b4j.html

1. Java JDK v8 (8u40+)
  • Open the Java 8 JDK download link.
  • Check the Accept License Agreement button.
  • Select "Windows x86" or "Windows x64" (for 64 bit machines) in the platforms list.
  • Download the file and install it.
Problem is (see top post) that version 10.x have problem with JSSC lib (serial demo crashes) but version 8.x works 64 and 32 bit!
Erel mention to try with 32 bit but unfortunately version 10 don't have this in download list for windows.

Java SE Development Kit 10.0.2
You must accept the Oracle Binary Code License Agreement for Java SE to download this software.
Accept License Agreement Decline License Agreement
Product / File Description
File Size Download
Linux 306 MB jdk-10.0.2_linux-x64_bin.rpm
Linux 338.43 MB jdk-10.0.2_linux-x64_bin.tar.gz
macOS 395.46 MB jdk-10.0.2_osx-x64_bin.dmg
Solaris SPARC 207.07 MB jdk-10.0.2_solaris-sparcv9_bin.tar.gz
Windows 390.25 MB jdk-10.0.2_windows-x64_bin.exe
 

Zlgo

Member
As you are using an installer with java included. Why not just use V8 Release for the installer?
Right now I'm just testing serial communication on PC but for real will put on Raspberry, and working in debug mode.After made Java update, test application start
crushing and whole story begin to be problematic if also user make update of java.
 

OliverA

Expert
Licensed User
but version 8.x works 64 and 32 bit!
It does work with 64bit? It never did before, that was always the issue here on the forums
(JSSC bombing out when using 64 bit Java).
It looks like only option is to wait for resolving bug (some compatibility if I understand well) in JSSC lib.
Good luck. The last time this was updated was January 2014. I think if you want 64 bit compatibility, then
1) hopefully find another library
2) modify the code on your own
If successful with either #1 or #2, post a link to the updated library to the forum, since this has been a long and ongoing issue with JSSC.

Update: Actually, the issues seemed to be related to Windows 10 and 64bit Java. I'm unsure of other platforms/previous Windows versions and 64bit Java.
 
Last edited:

Zlgo

Member
Hi Oliver
I'm very fresh in J4B and find it interesting for practical use, and did't now that serial communication is very old problem(you say 2014. but discussion on above link is very fresh)
Primary will use in communication with barcode scanners and printers so I tested modified Serial demo with this devices and it works well, now have to try on
Raspberry.
Right now (removed java ver 10.x) have installed :
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
 
Top