Skip to main content
Visitor II
July 28, 2022
Solved

Why reading function of the ST25SDK are segfaulting?

  • July 28, 2022
  • 2 replies
  • 634 views

Hello,

I've develop a solution that write and verify the content of nfc tag. I'm using the ST25R3911B-DISCO board to do this. The application is fast enought and work fine but, sometime it segfault. (~5/h). It always come after a read instruction (readMultipleBlock or readSingleBlock either). I let you here the call trace.

    This topic has been closed for replies.
    Best answer by Damien G.

    Hello,

    thank you for sending the logs.

    From the data in there, the crash comes from the sendReceive call implemented in the streader JNI writing at a wrong address (address violation). It could be a problem in the JNI code (streader.dll) that happens when an error is reported from the reader but not handled properly.

    You say that the crash always happen after a read single/multiple block at around 1 time every 12 minutes. It would be great if we could get a way to replicate the issue systematically (might not be easy to do). If you manage to get more details on the failure conditions, we would certainly be glad for the extra help. In any case we can try to replicate in our environment with the ST25PCNFC software.

    Regards,

    Damien

    2 replies

    Damien G.Answer
    ST Employee
    July 29, 2022

    Hello,

    thank you for sending the logs.

    From the data in there, the crash comes from the sendReceive call implemented in the streader JNI writing at a wrong address (address violation). It could be a problem in the JNI code (streader.dll) that happens when an error is reported from the reader but not handled properly.

    You say that the crash always happen after a read single/multiple block at around 1 time every 12 minutes. It would be great if we could get a way to replicate the issue systematically (might not be easy to do). If you manage to get more details on the failure conditions, we would certainly be glad for the extra help. In any case we can try to replicate in our environment with the ST25PCNFC software.

    Regards,

    Damien

    ABode.1Author
    Visitor II
    July 29, 2022

    Thank you for your answer Damien. Unfortunately, I've try a lot to replicate the error systematically but I can't... The crash doesn't append exactly every 12 minutes, sometimes it could work fine 1 hour long, sometimes it crash 3 times in 15 minutes... Quite hard to understand...

    Even if you can't find a solution, thanks for your help.

    Regards,

    Alban