Android Question CustomListView Overflow?

Binary Soft

Member
Licensed User
Longtime User
Hi,

I use customlist view in my project.
It's well done.
But It shows the below error when table is more than 2000 rows.
How can I fix it?

art/runtime/indirect_reference_table.cc:121] JNI ERROR (app bug): weak global reference table overflow (max=51200)
art/runtime/indirect_reference_table.cc:121] weak global reference table dump:
art/runtime/indirect_reference_table.cc:121] please find table dump in dropbox: 11539-weak global reference-table-overflow-dump
 
Last edited:

Binary Soft

Member
Licensed User
Longtime User
Hi,

I use customlistview in my project with lazy loading. Loading speed is great.
But It also same error after rows is over 12,500. This sample Rows is ten times of first project (before lazy loading).
Is it customlistview max limit?
I found max =51200 in bug report. max is row count?


JNI ERROR (app bug): weak global reference table overflow (max=51200)

Thanks
 

Attachments

  • 60600293_2142228646063250_3859117515200266240_n.png
    60600293_2142228646063250_3859117515200266240_n.png
    148 KB · Views: 248
Last edited:
Upvote 0

Binary Soft

Member
Licensed User
Longtime User
No.
There is no hard limit. It depends on the available memory and especially in the number of views created.

Can you post the VisibleChanged code?


B4X:
Sub myListView_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
    Dim ExtraSize As Int = 20
    Dim n As Int = myListView.Size-1
    For i = 0 To n
        Dim p As B4XView = myListView.GetPanel(i)
        If i > FirstIndex - ExtraSize And i < LastIndex + ExtraSize Then
            'visible+
            If p.NumberOfViews = 0 Then
                Dim iv As mySaleReportValue = myListView.GetValue(i)
                p.LoadLayout("2")
                p.SetLayoutAnimated(0,0,0,100%x,40dip)
                mySNo.Text = iv.mySNo
                myVNo.Text = iv.myVNo
                myName.Text = iv.myName
                myDigit.Text= iv.myDigit
                myUnit.Text=iv.myUnit
                myRowID.Text= iv.myRowID
                'Log("SNo: " & i  & " " &  iv.myDigit)
            End If
        Else
            'not visible
            If p.NumberOfViews > 0 Then
                p.RemoveAllViews
            End If
        End If
    Next
End Sub

Erel,
Now My sample records are only 11528 rows.
I show error, records are more than 12000.

Sample Project is send by message.
 
Upvote 0
Top