NXP advanced lib NullPointerException while reading DESFire

Forum / MIFARE SDK / NXP advanced lib NullPointerException while reading DESFire

  • 30. August 2016 at 20:10
    I randomly get this while reading DESFire EV1 card. It leads to delay in reading card for several second. Is there a fix for the problem?

    I/NXP_NFC_LIBRARY(16029): println needs a message
    I/NXP_NFC_LIBRARY(16029): java.lang.NullPointerException: println needs a message
    I/NXP_NFC_LIBRARY(16029): at android.util.Log.println_native(Native Method)
    I/NXP_NFC_LIBRARY(16029): at android.util.Log.d(Log.java:139)
    I/NXP_NFC_LIBRARY(16029): at com.nxp.nfclib.utils.NxpLogUtils.log(:758)
    I/NXP_NFC_LIBRARY(16029): at com.nxp.nfclib.desfire.DESFireEV1.isCardDESFireEV1(:7052)
    I/NXP_NFC_LIBRARY(16029): at com.nxp.nfclib.NxpNfcLib.ˊ(:1204)
    I/NXP_NFC_LIBRARY(16029): at com.nxp.nfclib.NxpNfcLib.ˎ(:583)
    I/NXP_NFC_LIBRARY(16029): at com.nxp.nfclib.NxpNfcLib.filterIntent(:530)
    I/NXP_NFC_LIBRARY(16029): at com.arrowpass.checker.gate.ArrowPassCardFactory.getCard(ArrowPassCardFactory.java:80)
    I/NXP_NFC_LIBRARY(16029): at com.arrowpass.checker.role.cardprocessor.CardProcessor$StateProcessing.(CardProcessor.java:106)
    I/NXP_NFC_LIBRARY(16029): at com.arrowpass.checker.role.cardprocessor.CardProcessor$StateStart.processEvent(CardProcessor.java:89)
    I/NXP_NFC_LIBRARY(16029): at com.arrowpass.checker.role.PaymentRole$StateReadingBalance.set(PaymentRole.java:666)
    I/NXP_NFC_LIBRARY(16029): at com.arrowpass.checker.role.PaymentRole$StateGetBalance.processEvent(PaymentRole.java:578)
    I/NXP_NFC_LIBRARY(16029): at com.arrowpass.checker.role.PasswordRole$StateNestedRole.processEvent(PasswordRole.java:141)
    I/NXP_NFC_LIBRARY(16029): at com.arrowpass.checker.role.BaseRole$7.run(BaseRole.java:609)
    I/NXP_NFC_LIBRARY(16029): at android.os.Handler.handleCallback(Handler.java:808)
    I/NXP_NFC_LIBRARY(16029): at android.os.Handler.dispatchMessage(Handler.java:103)
    I/NXP_NFC_LIBRARY(16029): at android.os.Looper.loop(Looper.java:193)
    I/NXP_NFC_LIBRARY(16029): at android.app.ActivityThread.main(ActivityThread.java:5299)
    I/NXP_NFC_LIBRARY(16029): at java.lang.reflect.Method.invokeNative(Native Method)
    I/NXP_NFC_LIBRARY(16029): at java.lang.reflect.Method.invoke(Method.java:515)
    I/NXP_NFC_LIBRARY(16029): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
    I/NXP_NFC_LIBRARY(16029): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
    I/NXP_NFC_LIBRARY(16029): at dalvik.system.NativeStart.main(Native Method)

    + 0  |  - 0

    Re: NXP advanced lib NullPointerException while reading DESFire

    5. September 2016 at 14:03
    Hi Arrowpass,

    It seems the bug is bad using of the read method. Please check one of the detailed DESFire read/write examples of this forum.

    Kind regards,
    The MIFARE Team

    + 0  |  - 0

    Re: NXP advanced lib NullPointerException while reading DESFire

    5. September 2016 at 20:34
    It does not look as wrong usage. Other times anything works well. It is likely depends on NFC link condition.

    Any way do you think it is ok to raise NullPointerException while trying to print common log message? Even in case wrong usage library shouldn't fire NullPointerException except the case when user pass null instead of some value.

    In this case it is not thrown through API level. It is good thing. But it make a delay in card processing for about 2 sec. It is bad thing. After these 2 sec. it continue without errors. This delay in application response is not acceptable for our application.

    That is why I ask about fix. Anyway it looks like I cannot download NXP advanced SDK anymore... The next question is when TapLinx version will be available for download?
    + 0  |  - 0

    Re: NXP advanced lib NullPointerException while reading DESFire

    6. September 2016 at 16:03
    Hi Arrowpass,

    Did you see this post:

    Trying to read DESFire EV1 Card, requires Authentication

    It is working example of reading the MIFARE DESFire EV1 (without a null pointer exception).

    Kind regards,
    The MIFARE Team
    + 0  |  - 1

    Re: NXP advanced lib NullPointerException while reading DESFire

    7. September 2016 at 9:57
    Hey... Did somebody from NXP with java programming skills read my messages carefully ?
    Can you escalate the problem to appropriate level?

    Thanks in advance.
    + 0  |  - 0

    Re: NXP advanced lib NullPointerException while reading DESFire

    13. September 2016 at 9:07
    Hi Arrowpass,

    I will hand over your problem to the development team, but a short error log is not sufficient to understand what is going wrong. Please tell me the call method and arguments, the Android version and the model you use.

    You can use this mail address for a direct feedback: mifaresdk@nxp.com

    The TapLinx Team
    + 0  |  - 0
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.