Attempt to invoke interface method 'int java.util.list.size()' on a null object reference

While clicking on the saved form to edit the form showing the subject cited error.

Welcome to the community, @ssraza! Could you also share a screenshot of the issue? This should help us understand your issue pictorially.

Do you get this error message when you try to load the blank forms in your Collect android app? As a cross check are you able to load it in Enketo?

The forms which have been saved as draft, when I click on any of the form to edit and further submission to server at loading point of form this error occurs.

Still not checked in Enketo, will check & inform you accordingly.

1 Like

So if I understand you clearly, you only see this when you try to edit the submissions from the draft. Loading a fresh new form does not have an effect correct?

yes, loading of fresh form is fine, no error.

1 Like

In addition, could you also validate your XLSForm through this online validator to see if there are any syntax issues?

Online validator not giving any syntax error message.

Submissions are coming smoothly, only giving error on saved as draft forms.

Which Collect android app are you using for this? The KoboCollect android app or the ODK Collect android app? Besides, is this an issue with only a single device, or is it an issue with multiple devices?

I am using ODK Collect app for this data collection. This issue is coming on multiple devices.

One final check before we troubleshoot. Could you also clone your project and then make a dummy entry and then try to edit it to see if the error message is seen in the dummy project too?

Cloned the form as you suggested and made dummy entry but still same error. lot of forms pending in draft due to this problem, its very urgent.

Thanks

@ssraza, could you also let us know the Collect android app version you are using?

Many thanks for your support, I got the solution from ODK forum.

I used below mentioned search function with select one option question and the options were defined in the choices sheet. while the search functions are used to load choices from external csv files.

Row 9: search('n_districts', 'matches', 'province_id', ${province_id})
Row 10: search('n_tehsils', 'matches', 'district_id', ${district_id})

Thanks

1 Like

@ssraza, :clap: :heart: :partying_face:

@Kal_Lam
I also have the same issue but I am not sure whether my case is the same as @ssraza or not.
I use " search function" and use choice filter in the choice sheet as shown below:


Pls help give advice on how to solve the issue since I do not see the example form provided by @ssraza.

@ChenChen, as advised previously you could always validate your XLSForm through the online validator to see if there are any syntax issues causing the error message.