java-native/jssc

App crashes after card is read on MAC (after update from 2.6.0 to 2.9.6)

Closed this issue · 5 comments

Hello,

we used JSSC v2.6.0 for many years but in newest version of our app we moved to v2.9.6. Everything seems to be working. We tested that on Windows, Linux and MAC without any issues.
But today we updated our client to this new version with JSSC v2.9.6 and card reader was correctly found and set, but when client tried to read a card, whole app always crashes. They were using MAC.

Hi,

Steps to reproduce are required for investigation. At a bare minimum:

  • MacOS version
  • Java version
  • Problematic code to reproduce

For example, "Try to read a card" is ambiguous and does not describe the code path necessary for identifying the crash.

Also, additional troubleshooting measures performed (reproducing on a different machine) is helpful for identifying.

Lastly, if you have a way of obtaining the JVM crash it may also allude to the problematic code path.

Hello,
thanks!

MAC version: MacOS - 10.12.6 (iMac 21.5-inch 2017)
Java version: JDK 1.8_111

We tried also JDK 1.8_371.
With both JDK versions card reading worked (with same card reader device) on our test MAC, but not on client's MAC.

Unfortunately I could not get any logs or JVM crash log, so I cannot recognize code where the app crashes.

Thanks. What JDK did you use? Java 8 is very different between Oracle and OpenJDK 8 so the runtime vendor is needed. Oracle has standardized most components starting with Java 11 / OpenJDK 11.

Also, we still would expect some type of abbreviated code snippet surrounding where the crash occurs. I understand this may be impossible to gather from the workstation, but your knowledge of your own codepath prior to the crash should infer some snippets that can be used to reproduce the problem.

As JSSC searches native binary in various places, you may want to make sure some other version is not being loaded on the client's machine. It may be pulled from some other dependency, like mentioned here: #65 (comment) or perhaps the old version is installed and loaded from the application's work directory (see #92).

With both JDK versions card reading worked (with same card reader device) on our test MAC, but not on client's MAC.

I missed this part of the details. This suggests we will not be able to reproduce either.

As JSSC searches native binary in various places, you may want to make sure some other version is not being loaded on the client's machine. It may be pulled from some other dependency, like mentioned here: #65 (comment) or perhaps the old version is installed and loaded from the application's work directory (see #92).

I agree and would expect this to be the problem, quoting:

Lastly, if you have a way of obtaining the JVM crash it may also allude to the problematic code path.

The crash would likely indicate the binary location.

Since this issue has gone unanswered for a month, I'm closing it as invalid. If you are able to provide some steps to reproduce we can look into it future.

Note that one other possible cause can be if we're compiling for CPU features that aren't available on older machines. If this happens, a crash can occur when we try to use CPU instruction sets that are not available. I'm not very well versed on the differences so the crash log or someone more familiar with these extensions (and how to exclude them) would likely be needed for this. For example, we can toggle specific CPU features by adding -march=<FOO> to our build flags.

https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html