ECOM-Comm crash in simulation

Hello MicroEJ team,

I’m trying to use ECOM-Comm to connect to a USB dongle but my application crashes in simulation as soon as I try to connect.

CommConnection connection = (CommConnection) Connector.open(url);

I get the following error:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=3948, tid=0x0000000000003628
#
# JRE version: Java(TM) SE Runtime Environment (8.0_261-b12) (build 1.8.0_261-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [jSSC-2.8.dll+0xb5db]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\jadams\workspace\Platform-Mock-GNUv52_xtensa-esp32-psram-1.1.0\source\scripts\hs_err_pid3948.log
Exception in thread "COMMpmp" java.lang.UnsatisfiedLinkError: Broken connection with client
    at java.lang.Throwable.fillInStackTrace(Throwable.java:82)
    at java.lang.Throwable.<init>(Throwable.java:37)
    at java.lang.Error.<init>(Error.java:18)
    at java.lang.LinkageError.<init>(LinkageError.java:18)
    at java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:10)
    at ej.ecom.connection.comm.CommConnectionCreator$1.run(CommConnectionCreator.java:132)
    at java.lang.Thread.run(Thread.java:319)
    at java.lang.Thread.runWrapper(Thread.java:379)
Exception in thread "main" java.lang.UnsatisfiedLinkError: Broken connection with client
    at java.lang.Throwable.fillInStackTrace(Throwable.java:82)
    at java.lang.Throwable.<init>(Throwable.java:37)
    at java.lang.Error.<init>(Error.java:18)
    at java.lang.LinkageError.<init>(LinkageError.java:18)
    at java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:10)
    at ej.ecom.connection.comm.CommConnectionCreator.openAndConfigure(CommConnectionCreator.java:382)
    at ej.ecom.connection.comm.CommConnectionCreator.open(CommConnectionCreator.java:278)
    at ej.ecom.connection.comm.ConnectionFactory.open(ConnectionFactory.java:24)
    at ej.ecom.io.Connector.open(Connector.java:81)
    at ej.ecom.io.Connector.open(Connector.java:47)
    at com.mycompany.comm.impl.ComMain.main(ComMain.java:26)
    at java.lang.MainThread.run(Thread.java:891)
    at java.lang.Thread.runWrapper(Thread.java:379)
#
# 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.

I have been able to check that the COM port is the right one because I get an other error when I change this parameter.
Moreover, the first part of the error message makes me think that the issue is related to jSSC and not my usage of ECOM-Comm.

Could you please help me with this issue?

Hello jadams,

The problem comes from the jSSC dll which is outdated.

Here is the procedure to fix your issue:

  • Download the new dll version here: dropins_JSSC.zip (189.4 KB)
  • In the MicroEJ SDK, create a dropins/ folder in your {YOUR PLATFORM}-configuration project (if not done yet)
  • Extract the resources/ folder of the dropins_jSSC.zip archive in the newly created dropins/ folder
  • Build your platform to perform the update

Let me know if it solves your issue,

Regards,

Alex C.

2 Likes

Hello @alex.colleux ,

This indeed solved my issue. Thanks a lot!