Problem with calculate expressions for area in v1.16.0

What is the problem? Please be detailed.

I can not load a form that has the calculate function area(). An error is thrown when I try to open the form for filling.

What ODK tool and version are you using? And on what device and operating system version?

I am using ODK Collect version v1.16.0(latest version). I am using a Samsung Galaxy Tablet - Galaxy Tab A(2016), Model Number - SM-T280. Android version - 5.1.1

What steps can we take to reproduce the problem?

Download the attached test form on ODK Collect. Click on Fill Blank Form then click on the form.

What you have you tried to fix the problem?

I tried loading the same form on older versions of ODK Collect and it opened just fine. I was able to fill in data and submit a few records. I tried the following versions; v1.15.1, v1.15.0, v1.14.1, v1.14.2

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

Error returned Screenshot_072518_031655_PM

Test form

Hi @kaymutua

thank you very much for reporting this issue, it's indeed a bug in the Javarosa. As a workeround for now you can change your calculation to: if((${shape1}=null), 0, area(${shape1})) we will try to fix the issue and realease a new version of ODK Collect.


Thank you @Grzesiek2010 for the workaround.

Thanks so much for reporting this right away @kaymutua and for the quick action, @Grzesiek2010! v1.16.1 has the fix and is currently rolling out.

Great, Thank you for the quick fix @LN

1 Like