Games Try ... Catch... End Try was not catching the error

Gunther

Active Member
Licensed User
Longtime User
Crashlytics log giving this msg for a Android 8.0.0 Samsung device:

B4X:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void anywheresoftware.b4a.BA.setLastException(java.lang.Exception)' on a null object reference
       at twinnypoints.gg.goilsoft.de.game._badger_show(game.java:244)

I checked that Sub and don't know why this error was not catched:
B4X:
Public Sub Badger_show
    Try
        badgerReward.SetBadge( cmdRewardVideo, intRewardNumber )
    Catch
    End Try
End Sub
 
Last edited:

sorex

Expert
Licensed User
Longtime User
My guess is that it was catched but if you use the starter service your app just continues and the 'crash' was reported (by firebase?)
 

Gunther

Active Member
Licensed User
Longtime User
an uninitialized class
Unfortunately not. It is initialized in the Game Initialization Sub, and that will be initialized in the first Activity Resume Sub.
And as you know the App is running with 4500 installations with no issue, but sometimes this error pops up.
It should be something special but not sure what it could be.
 
Last edited:
Top