kivy / plyer

Plyer is a platform-independent Python wrapper for platform-dependent APIs
https://plyer.readthedocs.io
MIT License
1.61k stars 427 forks source link

Android - starting GPS - OverflowError: Python int too large to convert to C long #235

Open brentpicasso opened 8 years ago

brentpicasso commented 8 years ago

Seeing this on a Samsung S5 (Android 5.1.1) when calling gps.start() after gps.configure()

Thought this was because I wasn't on 1.2.4, but it appears buildozer pulls the latest when plyer is specified with no version number.

I/python (19240): [INFO ] [GeoProvider ] starting internal GPS D/LocationManagerService( 953): getProviders()=[passive, gps, network] I/python (19240): Traceback (most recent call last): I/python (19240): File "jnius/jnius_proxy.pxi", line 143, in jnius.jnius.py_invoke0 (jnius/jnius.c:25157) I/python (19240): File "jnius/jnius_conversion.pxi", line 383, in jnius.jnius.convert_python_to_jobject (jnius/jnius.c:8902) I/python (19240): OverflowError: Python int too large to convert to C long W/System.err(19240): java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null D/IOP_DB_BT( 3537): db_query: id DisableSniff :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 D/IOP_DB_BT( 3537): db_query: id ExtendSniffTime :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 D/IOP_DB_BT( 3537): db_query: id DisableSniff :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 D/IOP_DB_BT( 3537): db_query: id ExtendSniffTime :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 W/System.err(19240): at $Proxy0.hashCode(Unknown Source) W/System.err(19240): at java.util.Collections.secondaryHash(Collections.java:3405) W/System.err(19240): at java.util.HashMap.get(HashMap.java:300) W/System.err(19240): at android.location.LocationManager.wrapListener(LocationManager.java:854) W/System.err(19240): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:892) W/System.err(19240): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:495) W/System.err(19240): at org.renpy.android.SDLSurfaceView.nativeInit(Native Method) D/IOP_DB_BT( 3537): db_query: id DisableSniff :: key KEY_BDADDR, value 20:15:12:17:73:98 W/System.err(19240): at org.renpy.android.SDLSurfaceView.run(SDLSurfaceView.java:730) D/IOP_DB_BT( 3537): db_query: result 1 D/IOP_DB_BT( 3537): db_query: id ExtendSniffTime :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 W/System.err(19240): at java.lang.Thread.run(Thread.java:818) D/IOP_DB_BT( 3537): db_query: id DisableSniff :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 D/IOP_DB_BT( 3537): db_query: id ExtendSniffTime :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 I/python (19240): [CRITICAL ] [CrashHandler] Caught exception in Kivy loop: JVM exception occured D/IOP_DB_BT( 3537): db_query: id DisableSniff :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 D/IOP_DB_BT( 3537): db_query: id ExtendSniffTime :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 D/IOP_DB_BT( 3537): db_query: id DisableSniff :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 D/IOP_DB_BT( 3537): db_query: id ExtendSniffTime :: key KEY_BDADDR, value 20:15:12:17:73:98 D/IOP_DB_BT( 3537): db_query: result 1 I/python (19240): [CRITICAL ] [Traceback (most recent call last)] I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/window/window_pygame.py", line 403, in mainloop I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/window/window_pygame.py", line 290, in _mainloop I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/base.py", line 327, in idle I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/clock.py", line 515, in tick I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/clock.py", line 647, in _process_events I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/clock.py", line 406, in tick I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/app/autosportlabs/racecapture/databus/databus.py", line 136, in notify_listeners I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/app/autosportlabs/racecapture/geo/geoprovider.py", line 37, in _on_sample I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/app/autosportlabs/racecapture/geo/geoprovider.py", line 65, in _start_internal_gps I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/plyer/facades/gps.py", line 55, in start I/python (19240): File "/home/brent/git-projects/RaceCapture_App/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/plyer/platforms/android/gps.py", line 74, in _start I/python (19240): File "jnius/jnius_export_class.pxi", line 830, in jnius.jnius.JavaMultipleMethod.call (jnius/jnius.c:22349) I/python (19240): File "jnius/jnius_export_class.pxi", line 562, in jnius.jnius.JavaMethod.call (jnius/jnius.c:19099) I/python (19240): File "jnius/jnius_export_class.pxi", line 656, in jnius.jnius.JavaMethod.call_method (jnius/jnius.c:20184) I/python (19240): File "jnius/jnius_utils.pxi", line 43, in jnius.jnius.check_exception (jnius/jnius.c:3237) I/python (19240): JavaException: JVM exception occured

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38180480-android-starting-gps-overflowerror-python-int-too-large-to-convert-to-c-long?utm_campaign=plugin&utm_content=tracker%2F77151&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F77151&utm_medium=issues&utm_source=github).
brentpicasso commented 8 years ago

Also seeing this with a Nvidia K1 tablet, running android 6.0.

brentpicasso commented 8 years ago

I also tried it out with the v1.2.4 tag; same errors.