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

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

Open
hallahan opened this issue Dec 29, 2015 · 2 comments
Open

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

hallahan opened this issue Dec 29, 2015 · 2 comments

Comments

@hallahan
Copy link
Contributor

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.

@hallahan
Copy link
Contributor Author

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

@hallahan
Copy link
Contributor Author

hallahan commented Apr 6, 2016

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
Projects
None yet
Development

No branches or pull requests

1 participant