Android Question App crashes - Help needed in understanding logs

FrankBerra

Active Member
Licensed User
Longtime User
Hello forum!

I have an app that worked for months. Suddenly it crashes with unknown reason.

This is a part of error log:
B4X:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object anywheresoftware.b4a.objects.collections.Map.GetDefault(java.lang.Object, java.lang.Object)' on a null object reference
   at myproject.me.etichetta._vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv7(etichetta.java:311)
   at myproject.me.etichetta._designercreateview(etichetta.java:154)
   at java.lang.reflect.Method.invoke(Native Method)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
   at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:67)
   at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
   at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
   at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:292)
   at myproject.app.main._controlla_permessi(main.java:5773)
   at myproject.app.main._preloginregistrazione_button_accedi_click(main.java:10044)
   at java.lang.reflect.Method.invoke(Native Method)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
   at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1179)
   at android.os.Handler.handleCallback(Handler.java:790)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:164)
   at android.app.ActivityThread.main(ActivityThread.java:6494)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

I can understand that maybe a Collection is not initialized, but what does means "myproject.me.etichetta._vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv7" ?
It seems like a obfuscated name of a sub, but if i compile the app in Release mode or in Release (obfuscated) or in debug mode the error and the sub name remain the same.

If i compile in obfuscated mode and i search the string "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv7" in the file ObfuscatorMap.txt it says that it is related to this sub:
B4X:
Public Sub getBottom As Int
   Return mBase.Top + mBase.Height
End Sub

If i open the file etichetta.java this is the line 311:
B4X:
if (true) return BA.ObjectToString(_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv0._vv5.GetDefault((Object)(_nomestringa),(Object)("")));
that is more related to an collection (Map).


Anyone that can understand what it is happening here?
Thank you in advance!
 

FrankBerra

Active Member
Licensed User
Longtime User
Update:
After a lot of troubles with strange errors like the one above and also with errors like "xyz was declared with the wrong type", i decided to rollback from B4A v.9 to B4A v.8.80.
Now everything started to work again. Maybe the new version of B4A is buggy.
 
Upvote 0

FrankBerra

Active Member
Licensed User
Longtime User
I am sorry but it is a big project and i am unable to reproduce it into a smaller one since it started to happen suddenly without any reason.

All the errors were related to Custom view modules.
After searching on the forum i was able to fix the error "xyz was declared with the wrong type" by removing and adding back again the customview into the designer, but i wasn't able to solve the other problem.
As i said, with B4A v. 8.80 everything is back to normal.
Now i need to work on the app so i will stay with 8.80 but in few days i will try to upgrade again to v. 9.0 and see what happens.
 
Upvote 0
Top