Android Question Attempt to invoke virtual method 'void anywheresoftware.b4a.objects.collections.List.Initialize()' on a null object refere

Filippo

Expert
Licensed User
Longtime User
Hi,

I have this error message in Firebase Crashlytics caused by Galaxy S23 Ultra ( Android 14).

The error only occurs since Android 14.

Has anyone had the same error?
If so, how can it be solved?

In a "jobdone" sub I have this code:
B4X:
Sub JobDone(job As HttpJob)
    Dim parser As JSONParser
    Dim res As String
    
    If job.Success Then
        res = job.GetString
        parser.Initialize(res)
        'Log(job.GetString)
        Select job.JobName
            Case "RequestProductsInformation"
                Dim list As List
                lst.Initialize
                Try
                    list = parser.NextArray
                Catch
                    ToastMessageShow("Error when checking the license!", True)
                    Return
                End Try
                If list.Size > 0 Then
                    Dim mp As Map = list.Get(0)
                    CallSub2(CallBack, mEventName & "_ShowInAppBilling", mp)
                Else
                    ToastMessageShow("Kein App-Produkt in der Datenbank vorhanden!", True)
                End If
        End Select
    End If
    job.Release
End Sub

Firebase-Crashlytics:

clsinappbilling.java:

 

Daestrum

Expert
Licensed User
Longtime User
You're missing an 'i'
B4X:
                Dim list As List
                lst.Initialize    '<<<  lst instead of list
                Try
                    list = parser.NextArray
                Catch
 
Upvote 2
Solution
Cookies are required to use this site. You must accept them to continue using the site. Learn more…