Value "speed":Infinity on querying GPS position of advanced privacy excluded APPs may lead to app crash
- /e/OS version: 3.0.1-a14-20250607498722-offial-FP4
- Device model(s): FP4
- Impacted Application: Klimataler
- Affected application/URL: com.backsquared.sdkapp.klimataler
- Browser/client and version: 1.18.1
The problem
The app crashes when reading the GPS position because /e/OS system returns >“speed”:Infinity< as the value for the movement speed. However, this value is invalid in the JSON definition (I assume it should be "0" instead when not moving...!). The problem only occurs if “Fake geolocation” is activated in “Advanced Privacy” (so I strongly assume it's related to Fake geolocation function)! The app is excluded from “fake geolocations”. Latitude and longitude are also correct. But the value for “speed” is not. Is this value possibly changed by advanced privacy but not covered by the exceptions (e.g. to anonymize speed)?
Problem is also described on the forum at https://community.e.foundation/t/sammelt-klima-taler-app-einsparungen/71040
Steps to reproduce
Install the app "Klimataler", login an start function "measure distances automatically". The app will start measurement but crashes within about 1 minute (while checking location).
Technical details
In the app log (adb logcat) this can be seen as follows:
06-28 16:00:17.223 14676 14676 E AndroidRuntime: kotlinx.serialization.json.internal.JsonEncodingException: Unexpected special floating-point value Infinity. By default, non-finite floating point values are prohibited because they do not conform JSON specification. It is possible to deserialize them using 'JsonBuilder.allowSpecialFloatingPointValues = true'
06-28 16:00:17.223 14676 14676 E AndroidRuntime: Current output: {"type":"Waypoint","tracked_at_ms":1750518016503,"latitude":48.0000000000000,"longitude":11.000000000000000,"accuracy":8.247378,"speed":Infinity
06-28 16:00:17.223 14676 14676 E AndroidRuntime: at kotlinx.serialization.json.internal.JsonExceptionsKt.InvalidFloatingPointEncoded(JsonExceptions.kt:34)