Skip to content

NumberFormatException in MotionSensorUtils #80

@tracts-root

Description

@tracts-root

Not sure whom I should mention here... But in goalie I am getting this exception from within the sense library:

java.lang.NumberFormatException: Infinity or NaN
at java.math.BigDecimal.valueOf(BigDecimal.java:777)
at nl.sense_os.service.motion.MotionSensorUtils.getVector(Unknown Source)
at nl.sense_os.service.motion.MotionBurstSensor.listToString(Unknown Source)
onNewData
at nl.sense_os.service.subscription.BaseDataProducer.removeSubscriber(Unknown Source)
sendToSubscribers
at nl.sense_os.service.motion.MotionSensor.onSensorChanged(Unknown Source)
at android.hardware.SensorManager$ListenerDelegate$1.handleMessage(SensorManager.java:538)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)

Since there is no goalie code in this trace, it is a bit tricky for me to deal with this adequately. For now I will just add a global UncaughtExceptionHandler so that this will at least not crash the whole app, but I can not oversee the consequences of letting the app continue after this error either...

Any ideas would be appreciated, a fix even more so :-)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions