Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geojson file causes an error in Android 7.0 #5458

Closed
dbemke opened this issue Feb 22, 2023 · 1 comment · Fixed by #5459
Closed

Geojson file causes an error in Android 7.0 #5458

dbemke opened this issue Feb 22, 2023 · 1 comment · Fixed by #5459
Assignees
Milestone

Comments

@dbemke
Copy link

dbemke commented Feb 22, 2023

ODK Collect version

master 8e633bf

Android version

emulated 7.0

Problem description

There is an error on opening All widgets form and Select one from map in the demo project on Android 7.0 and 5.1. I think that the forms in which error occurs use geojson file.
Things noticed:

  • All widgets forms works as expected in different projects Central/ Aggregate- probably older version of All widgets without select one from map (with geojson)
  • In the demo project it is possible to open the map form of All widgets form
  • in other projects forms work as expected but there is an error on geojson form

Steps to reproduce the problem

  1. Open the demo project.
  2. Go to Fill Blank Form.
  3. Open All widgets/ Select one from map

Other information

The issue doesn’t occur on the store version 2022.4.4

@lognaturel
Copy link
Member

lognaturel commented Feb 22, 2023

Adding some details from Slack. Stack trace is

No virtual method getParameterCount() in class Ljava/lang/reflect/Method; or its super classes (declaration of 'java.lang.reflect.Method' appears in /system/framework/core-oj.jar)
at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector._isIncludableMemberMethod(AnnotatedMethodCollector.java:187)
at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector._addMemberMethods(AnnotatedMethodCollector.java:118)
at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector.collect(AnnotatedMethodCollector.java:49)
at com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector.collectMethods(AnnotatedMethodCollector.java:40)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass._methods(AnnotatedClass.java:387)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass.memberMethods(AnnotatedClass.java:327)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addMethods(POJOPropertiesCollector.java:680)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collectAll(POJOPropertiesCollector.java:422)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getPropertyMap(POJOPropertiesCollector.java:386)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getProperties(POJOPropertiesCollector.java:233)
at com.fasterxml.jackson.databind.introspect.BasicBeanDescription._properties(BasicBeanDescription.java:164)
at com.fasterxml.jackson.databind.introspect.BasicBeanDescription.findProperties(BasicBeanDescription.java:239)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._findCreatorsFromProperties(BasicDeserializerFactory.java:328)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._constructDefaultValueInstantiator(BasicDeserializerFactory.java:272)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findValueInstantiator(BasicDeserializerFactory.java:223)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:262)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:151)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:415)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:350)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:648)
at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:4861)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4706)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2879)
at org.javarosa.core.model.instance.geojson.GeoJsonExternalInstance.parse(GeoJsonExternalInstance.java:50)
at org.javarosa.core.model.instance.ExternalDataInstance.parseExternalInstance(ExternalDataInstance.java:76)
at org.javarosa.core.model.instance.ExternalDataInstance.build(ExternalDataInstance.java:64)
at org.javarosa.xform.parse.XFormParser.parseDoc(XFormParser.java:549)
at org.javarosa.xform.parse.XFormParser.parse(XFormParser.java:399)
at org.javarosa.xform.util.XFormUtils.getFormFromFormXml(XFormUtils.java:121)
at org.odk.collect.android.tasks.FormLoaderTask.createFormDefFromCacheOrXml(FormLoaderTask.java:241)
at org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java:143)
at org.odk.collect.android.tasks.FormLoaderTask.doInBackground(FormLoaderTask.java:75)

It's related to FasterXML/jackson-databind#3412. We tried 2.13.3 and 2.13.5 with master and neither works. Any of the versions work with Collect v4.0.0. There's something about the new Collect usage that leads to that call stack. Ideally there'd be some way to modify the Collect usage. If not, we might need to do without data binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants