Android Question Runtime error when B4XLoadingIndicator called

TheRealMatze

Active Member
Licensed User
Hey there,
i added a B4XLoadingIndicator to one of my pages, but it will crash my app when i try to show it...

I call a sub onclick
B4X:
Sub selectFarm
    loadingCircle.Show
    Log(">> select >>")
    Dim farmSelect As farmValue=clv1.GetValue(clv1.GetItemFromView(Sender)) '<<< Error
    Log("<< select <<")
    StartActivity(animallist)
    refreshFarm.elm=clv1.GetItemFromView(Sender)
    CallSubDelayed2(animallist,"refreshList",farmSelect.id)
End Sub

When i comment the row "loadingCircle.Show" out it works, is the row executed i got the error

B4X:
>> select >>
farmlist_selectfarm (java line: 766)
java.lang.RuntimeException: Object should first be initialized (B4XView).
    at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67)
    at b4a.example3.customlistview._getitemfromview(customlistview.java:402)
    at vsoft.sedatacollector.farmlist._selectfarm(farmlist.java:766)
    at vsoft.sedatacollector.farmlist._city_click(farmlist.java:477)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:6597)
    at android.view.View.performClickInternal(View.java:6574)
    at android.view.View.access$3100(View.java:778)
    at android.view.View$PerformClick.run(View.java:25885)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Is this a threading related error?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…