I have scheduled service (starts every day) and on some devices Starter service with image variable and KVS is not started before scheduled service. I get in crash log:
Starter service looks like:
Scheduled service:
Similar error is on other service with KVS declared and initialized in Starter service. Service witch use KVS also trigger error on the line:
Error is:
Both errors are triggered in only about 0.5% of all devices. Sessions without crash: 99,5%.
Both app have combined over 70k active installations.
One more thing, both crashes looks like some kind of problem starting from latest B4A version.
This kind of crashes started to appear when apps get compiled with latest B4A v7.80.
EDIT:
I'm not able to reproduce this error on any of my devices and emulators, no matter what I try to do, but I can see error in Crash log (Firebase Analytics).
Object should first be initialized (Bitmap).
Starter service looks like:
B4X:
Sub Process_Globals
Public ImageOne As As Bitmap
End Sub
Sub Service_Create
ImageOne.LoadBitmap(File.DirAssets, "imageone.png")
End Sub
Scheduled service:
B4X:
Sub Service_Start (StartingIntent As Intent)
Dim notif As NotificationBuilder
Dim NotifL As NotificationCustomLayout
notif.Initialize
NotifL.Initialize("laynotif")
NotifL.SetTextField("Title", Application.LabelName)
NotifL.SetTextField("Test", "xxx")
NotifL.SetImage("AppIcon", Starter.ImageOne") '<- Error is triggered in this line
notif.OnGoingEvent = True
notif.DefaultSound = False
notif.DefaultLight = False
notif.DefaultVibrate = False
notif.AutoCancel = False
notif.Priority = 2
notif.ShowTime = False
notif.Category = notif.CATEGORY_CALL
notif.SmallIcon = "icona"
notif.Visibility = notif.VISIBILITY_PUBLIC
notif.CustomLayout = NotifL.BuildLayout
notif.setActivity(actX)
notif.Notify(1)
End Sub
Similar error is on other service with KVS declared and initialized in Starter service. Service witch use KVS also trigger error on the line:
B4X:
If Starter.Kvs.Get("xRange") = 1 Then
java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor anywheresoftware.b4a.sql.SQL.ExecQuery2(java.lang.String, java.lang.String[])' on a null object reference
Both errors are triggered in only about 0.5% of all devices. Sessions without crash: 99,5%.
Both app have combined over 70k active installations.
One more thing, both crashes looks like some kind of problem starting from latest B4A version.
This kind of crashes started to appear when apps get compiled with latest B4A v7.80.
EDIT:
I'm not able to reproduce this error on any of my devices and emulators, no matter what I try to do, but I can see error in Crash log (Firebase Analytics).