i use a list in my activity. sometimes i have this error in Firebase .when i compile my app it words correctly without any crash and can't see this error when i test my app
i use a list in main activity:
and use it in game activity:
i think this error happen when avtivity is paused long time and user come back to game again. when i see firebase logs i see this:
could anyone tell me why this error happen?
B4X:
Fatal Exception: java.lang.RuntimeException: Object should first be initialized (List).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67)
at anywheresoftware.b4a.objects.collections.List.getSize(List.java:129)
at..............game._globals(game.java:1161)
at java.lang.reflect.Method.invoke(Method.java)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at ...............game.initializeGlobals(game.java:327)
at ...............game.afterFirstLayout(game.java:102)
at ...............game.access$000(game.java:17)
at ...............game$WaitForLayout.run(game.java:83)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8506)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
i use a list in main activity:
B4X:
Dim gamelst As List
and use it in game activity:
B4X:
lststrings=Main.gamelst
LogColor("lststrings size : "&lststrings.size,Colors.Blue)
i think this error happen when avtivity is paused long time and user come back to game again. when i see firebase logs i see this:
could anyone tell me why this error happen?