Closed gsauthof closed 9 years ago
Perhaps this is because the 4th canteens response (to http://openmensa.org/api/v2/canteens?limit=50&page=4
) currently contains an entry with null coordinates?
I mean this entry:
{"id": 192,
"name": "Gebze Y\u00fcksek Teknoloji Enstit\u00fcs\u00fc",
"city": "Gebze/Kocaeli",
"address": "Gebze Y\u00fcksek Teknoloji Enstit\u00fcs\u00fc Rekt\u00f6rl\u00fc\u011f\u00fc P.K141 41400 Gebze/KOCAEL\u0130",
"coordinates": [null, null]},
That could be it. I filed an issue. As far as I see, the API does not specify what values can be null.
Because of this issue, the app is currently unusable for me. I just installed it on a new device where I cannot select any canteen because of this error.
Is there a workaround for this? Or maybe this issue can be fixed inside the app? I mean, the data might not be correct according to the specification, but a simple null check on the canteen input data would avoid the app to crash because of a single faulty canteen. I'm thinking in terms of robustness here.
Should be an easy fix, I believe. Unfortunately, I don't have the time to fix it right now but would be happy to merge a pull request and deploy a new version.
That is what I say. It would just require to check whether longitude or tatitude of the canteen is null, and if so, ignore it.
If you let me, I would even try to fix it on my own so that I have an incentive to set the development environment back up here ;)
That would be excellent. I just need to push to the play store because I have the certificate and stuff.
I can reproduce the issue with the current 0.8 version on a Android 5 device (there installed via fdroid, because it is not available in the google play store) and on a Android 4.3 device (there installed via google play).
Steps to reproduce it:
(step 2 is optional, app still crashes)
I've captured following stack trace via
adb logcat
: