Android Question It crashes and i cannot see book cover (improved thread)


Active Member
Licensed User
Longtime User
Hello again , in my previous thread (it crashes and i cannot see the book cover image like flags example ) the error log text is as follows , what am I doing wrong , please help:

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
main_b4xtable1_dataupdated (java line: 504)
java.lang.RuntimeException: Object should first be initialized (View).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(
at anywheresoftware.b4a.objects.B4XViewWrapper.GetView(
at b4a.example.main._b4xtable1_dataupdated(
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(
at anywheresoftware.b4a.keywords.Common.CallSub4(
at anywheresoftware.b4a.keywords.Common.CallSubNew(
at b4a.example.b4xtable$ResumableSub_ImplUpdateDataFromQuery.resume(
at anywheresoftware.b4a.keywords.Common$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)


    10.8 KB · Views: 193


Well-Known Member
Licensed User
Longtime User
view are the ui elements.
Object should first be initialized (View).
means u try access a view object but it is null (not initialized)
a view will be initialized if u used loadlayout, a file u made in the user interface designer.
or u created a object at runtime and forgot to call the obj.initialize method.
use the debug mode and break points.

in c# objects can be null and u need the new key word, in b4a u call initialize if u declared it by yourself.
Upvote 0


Well-Known Member
Licensed User
Longtime User
Firstly, don't post the same question in two different threads. Better to edit your original question if you want to make it clearer.

Second, is there data in the database? If not, your map object will be null.

- Colin .
Upvote 0


Licensed User
Longtime User
Upvote 0