getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
718 stars 1.38k forks source link

IllegalArgumentException: north must be in [-85.05112877980658,85.05112877980658] #5210

Closed grzesiek2010 closed 1 year ago

grzesiek2010 commented 2 years ago

Software and hardware versions

Collect v2022.3-beta.2

Problem description

https://console.firebase.google.com/u/1/project/api-project-322300403941/crashlytics/app/android:org.odk.collect.android/issues/a9dce6fd287162c902ab64bff0b7404a?time=last-thirty-days&versions=v2022.3-beta.2%20(4459)&types=crash&sessionEventKey=62DFD409011F000160D46D585EED42EA_1703092268465180737

Fatal Exception: java.lang.IllegalArgumentException: north must be in [-85.05112877980658,85.05112877980658]
       at org.osmdroid.util.BoundingBox.set(BoundingBox.java:74)
       at org.osmdroid.util.BoundingBox.<init>(BoundingBox.java:49)
       at org.osmdroid.views.overlay.Marker.setPosition(Marker.java:192)
       at org.odk.collect.osmdroid.OsmDroidMapFragment.createMarker(OsmDroidMapFragment.java:583)
       at org.odk.collect.osmdroid.OsmDroidMapFragment.access$400(OsmDroidMapFragment.java:83)
       at org.odk.collect.osmdroid.OsmDroidMapFragment$MarkerFeature.<init>(OsmDroidMapFragment.java:723)
       at org.odk.collect.osmdroid.OsmDroidMapFragment.addMarker(OsmDroidMapFragment.java:297)
       at org.odk.collect.geo.selection.SelectionMapFragment.updateFeatures(SelectionMapFragment.kt:349)
       at org.odk.collect.geo.selection.SelectionMapFragment.updateItems(SelectionMapFragment.kt:307)
       at org.odk.collect.geo.selection.SelectionMapFragment.initMap$lambda-12(SelectionMapFragment.kt:198)
       at org.odk.collect.geo.selection.SelectionMapFragment.$r8$lambda$eORcsBe43UXyO34EbAoju-w5ehM(SelectionMapFragment.kt)
       at org.odk.collect.geo.selection.SelectionMapFragment$$InternalSyntheticLambda$1$1620c5099d034226814d76328232bb7772b48590ed7c3ee00b4b2a5cc41fa8b2$6.onChanged(SelectionMapFragment.java:6)
       at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
       at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
       at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
       at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
       at org.odk.collect.android.widgets.items.SelectChoicesMapData._init_$lambda-1(SelectOneFromMapDialogFragment.kt:153)
       at org.odk.collect.android.widgets.items.SelectChoicesMapData.$r8$lambda$5V0uyUQGGttEA-c1pkszmMf-IO4(SelectOneFromMapDialogFragment.kt)
       at org.odk.collect.android.widgets.items.SelectChoicesMapData$$InternalSyntheticLambda$1$9c5d3ee6f4f7e155a85fcb2597ec79ebacb74d57bf81d8c47e63f2f568b4c50f$1.accept(SelectChoicesMapData.java:6)
       at org.odk.collect.async.CoroutineScheduler$immediate$1.invokeSuspend(CoroutineScheduler.kt:17)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:201)
seadowg commented 2 years ago

This is a duplicate of https://github.com/getodk/collect/issues/5174. It has mostly only come up because we created a test form that creates the crash. I think we should probably discuss whether we want to work around this in some way, but it isn't worth looking into right now @grzesiek2010.

lognaturel commented 2 years ago

Upgrading osmdroid should fix this: https://github.com/osmdroid/osmdroid/pull/1807

grzesiek2010 commented 2 years ago

That pr was merged on May 25 but the last release is from May 14 so we need to wait because it''s not included.

grzesiek2010 commented 1 year ago

This should be fixed in osmdroid so I'm closing.