AnsweredAssumed Answered

ST25 SDK fatal error on Mac OS X

Question asked by Amir Ben Ari on Apr 29, 2018
Latest reply on May 2, 2018 by victor laraison

Hi,

 

As though there are libraries available for Mac OS X, my simple application randomly (almost always) crashes, and it has something to do with the dynamic libraries provided, specifically streader.dylib.

Any thoughts would be appreciated.

 

I'm running a MacBook Pro with macOS High Sierra version 10.13.4.

 

My code:

public static void main(String[] args) throws STException {

 

stReader = new STReader();

 

boolean connected = stReader.connect();

connected = stReader.connect();

RFGenericReader mActiveRFReader = stReader;

        if (connected) {

        System.out.println("Connected!");

        

        String name = mActiveRFReader.getName();

        System.out.println(name + " is connected");

        

        stReader.initialize();

        List<byte[]> uidList = new ArrayList<>();

        try {

uidList = mActiveRFReader.getTransceiveInterface().inventory(RFReaderInterface.InventoryMode.NFC_TYPE_5);

            if (!uidList.isEmpty()) {

                Iso15693Command cmd = new Iso15693Command(mActiveRFReader.getTransceiveInterface(), null);

 

                cmd.setFlag(Iso15693Protocol.HIGH_DATA_RATE_MODE);

                cmd.resetToReady();

               

                System.out.println(Helper.convertByteArrayToHexString(Helper.reverseByteArray(uidList.get(0))));

            }

} catch (STException e) {

e.printStackTrace();

}

        

        }

}

 

Sometimes it crashes at mActiveRFReader.getName() [Console output]:

Connected!

#

# A fatal error has been detected by the Java Runtime Environment:

#

#  SIGSEGV (0xb) at pc=0x000000011081bd48, pid=6725, tid=0x0000000000002803

#

# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13)

# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode bsd-amd64 compressed oops)

# Problematic frame:

# C  [streader.dylib+0xd48]  Java_com_st_st25pc_model_readers_st_STReader_getName+0x18

 

And sometimes it crashes at  mActiveRFReader.getTransceiveInterface().inventory(RFReaderInterface.InventoryMode.NFC_TYPE_5) [Console output]:

 

Connected!

CR95HF is connected

Switching to: READER_MODE_ISO15693_MODE

#

# A fatal error has been detected by the Java Runtime Environment:

#

#  SIGSEGV (0xb) at pc=0x0000000120fc6dc6, pid=6714, tid=0x0000000000001803

#

# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13)

# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode bsd-amd64 compressed oops)

# Problematic frame:

# C  [streader.dylib+0xdc6]  Java_com_st_st25pc_model_readers_st_STReader_selectReaderMode+0x46

 

And sometimes I get the following, which I'm not sure what it means [Console output]:

Connected!

CR95HF is connected

Switching to: READER_MODE_ISO15693_MODE

=> txString 010D

<= rxString

=> txString 02A8

<= rxString

=> txString 260100

<= rxString

=> txString 060100

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

=> txString 0104

<= rxString

Outcomes