Skip to content

Tag-Swipe -> MapView -> TagSwipe Crashes on Save #113

Open

Description

@hallahan

Sometimes if I'm in the tag view, go back to the map view, then go back to the tag view, then save to ODK Collect, the app crashes.

Looking at the log, there is a null pointer exception for OSM Element keys and values. Perhaps the selected OSMElement somehow gets lost in the mix.

Activity

  1. hallahan commented on Dec 29, 2015

    @hallahan
    ContributorAuthor

    In investigating further, it appears that the actual crash happens when we return to ODK Collect. Perhaps some sort of inconsistency is introduced to the intent's extras?

    The MapActivity is finished, and ODK Collect is returned to.

    https://github.com/AmericanRedCross/OpenMapKitAndroid/blob/6585d499064745a94bccccc544d9be4a98be34d4/app/src/main/java/org/redcross/openmapkit/MapActivity.java#L667

  2. hallahan commented on Apr 6, 2016

    @hallahan
    ContributorAuthor

    After a bit of debugging, I'm not seeing any errors in logcat *:E.

    The crash occurs in ODK Collect, though I think OpenMapKit is sending Activity.RESULT_CANCELED to ODK Collect in onActivityResult.

    https://github.com/opendatakit/collect/blob/60aae502fd6cc8877576ff69f6742c489d85b82f/collect_app/src/main/java/org/odk/collect/android/activities/FormEntryActivity.java#L574

    This is strange, because we explicitly set Activity.RESULT_OK ever time, including if the user goes back and forth between TagSwipe.

    https://github.com/AmericanRedCross/OpenMapKitAndroid/blob/c107c89f48065c1fab93790257f8f997be2cee35/app/src/main/java/org/redcross/openmapkit/MapActivity.java#L691

    My only guess is that there is some error (though it's not getting logged in logcat?) that is popping both TagSwipe and MapActivity off the stack outside of this line of code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions