Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75906

[Android] NullPointerException at QtInAppPurchase.java:240 & QtInAppPurchase.java:166

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 5.15
    • 5.12.3, 5.12.9, 5.15.0
    • Purchasing
    • Huawei devices running Android 8 & Samsung devices running Android 9
    • Android
    • 2022wk38FOQtforAndroid

    Description

      In my Google Play console I noticed a lot of crashes that point to:

      java.lang.NullPointerException: 
       at org.qtproject.qt5.android.purchasing.QtInAppPurchase$2.run (QtInAppPurchase.java:240)
       at java.lang.Thread.run (Thread.java:784)

      Almost all of these crashes happen on Huawei devices.

      Recently I've integrated Firebase Crashlytics and I've noticed another crash that points to the same issue:

      Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle com.android.vending.billing.IInAppBillingService.getPurchases(int, java.lang.String, java.lang.String, java.lang.String)' on a null object reference
             at org.qtproject.qt5.android.purchasing.QtInAppPurchase.queryPurchasedProducts(QtInAppPurchase.java:166)
             at org.qtproject.qt5.android.purchasing.QtInAppPurchase.access$200(QtInAppPurchase.java:52)
             at org.qtproject.qt5.android.purchasing.QtInAppPurchase$1$1.run(QtInAppPurchase.java:99)
             at java.lang.Thread.run(Thread.java:764)
      

      This new crash mainly impacts Samsung devices running Android 9.
       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jani-korteniemi Jani Korteniemi
              adrian.gabureanu Adrian Gabureanu
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes