Android Question Google Console Crash Report

ilan

Expert
Licensed User
Longtime User
hi

i saw today that on 3 devices my app crashed. according to the crash report a label was used before it was intialized and also "Load Layout" is mentioned in that report and from what i know Views that were created via designer should not be intialized so what could be the problem?

java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (Label).
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:166)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at www.sagital.powerblocks.main._activity_create(main.java:928)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at www.sagital.powerblocks.main.afterFirstLayout(main.java:102)
at www.sagital.powerblocks.main.access$000(main.java:17)
at www.sagital.powerblocks.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5679)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Object should first be initialized (Label).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.ViewWrapper.innerInitialize(ViewWrapper.java:71)
at anywheresoftware.b4a.objects.LabelWrapper.innerInitialize(LabelWrapper.java:27)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:406)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:425)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:425)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:144)
... 17 more

thanx, ilan
 

marcick

Well-Known Member
Licensed User
Longtime User
And of course the label is declared in globals before you do something with it, right ?
Me too have a crazy situation (not jet solved) here
It's different but someway analog.
Probably it has nothing to deal with, but I feel I started to have this funny problem when I started to use the Starter service. Are you using it too ?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
google1.jpg
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
this is the first time i see an error that is related to Load Layout but i have not really looked very close on all my crash reports.

if i remember correctly minSDK = 11 and TargetSDK = 19

(minsdk = 11 is because i am using accelerated surface and the hardware support is only from api 11 available)

according to informatix thread:

This library does not work with Android versions < 2 (Eclair and Froyo may exhibit performance problems, so I recommend only Gingerbread or a newer version for animations with a high FPS).
The hardware acceleration is not enabled with Android versions < 3.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Hi @ilan. I have a device (Sony Xperia E1) with Android 4.4.2.
I download the app in Google Play and works fine.

thanx @asales but i think this happns only on android 4.4 and i have the felling it has something to do with:

B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Material")
 
Upvote 0
Top