openxc / openxc-android

Android library for accessing vehicle data from an OpenXC vehicle interface
BSD 3-Clause "New" or "Revised" License
236 stars 115 forks source link

Clicking on "Search for Bluetooth VI" while bluetooth is off stops the Enabler app #123

Closed zacnelson closed 10 years ago

zacnelson commented 10 years ago

The "Unfortunately, OpenXC Enabler has stopped." pop-up appears but the appears to continue normal operation. Running the latest "next" branch. See the attached logcat:

02-28 12:44:35.807: W/Bundle(10144): Key com.crashlytics.ApiKey expected String but value was a java.lang.Integer.  The default value <null> was returned.
02-28 12:44:35.807: W/Bundle(10144): Attempt to cast generated internal exception:
02-28 12:44:35.807: W/Bundle(10144): java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
02-28 12:44:35.807: W/Bundle(10144):    at android.os.Bundle.getString(Bundle.java:1121)
02-28 12:44:35.807: W/Bundle(10144):    at com.openxc.enabler.OpenXcEnablerActivity.hasCrashlyticsApiKey(OpenXcEnablerActivity.java:117)
02-28 12:44:35.807: W/Bundle(10144):    at com.openxc.enabler.OpenXcEnablerActivity.onCreate(OpenXcEnablerActivity.java:129)
02-28 12:44:35.807: W/Bundle(10144):    at android.app.Activity.performCreate(Activity.java:5231)
02-28 12:44:35.807: W/Bundle(10144):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
02-28 12:44:35.807: W/Bundle(10144):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
02-28 12:44:35.807: W/Bundle(10144):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
02-28 12:44:35.807: W/Bundle(10144):    at android.app.ActivityThread.access$800(ActivityThread.java:135)
02-28 12:44:35.807: W/Bundle(10144):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
02-28 12:44:35.807: W/Bundle(10144):    at android.os.Handler.dispatchMessage(Handler.java:102)
02-28 12:44:35.807: W/Bundle(10144):    at android.os.Looper.loop(Looper.java:136)
02-28 12:44:35.807: W/Bundle(10144):    at android.app.ActivityThread.main(ActivityThread.java:5017)
02-28 12:44:35.807: W/Bundle(10144):    at java.lang.reflect.Method.invokeNative(Native Method)
02-28 12:44:35.807: W/Bundle(10144):    at java.lang.reflect.Method.invoke(Method.java:515)
02-28 12:44:35.807: W/Bundle(10144):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
02-28 12:44:35.807: W/Bundle(10144):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
02-28 12:44:35.807: W/Bundle(10144):    at dalvik.system.NativeStart.main(Native Method)
02-28 12:44:35.807: E/OpenXcEnablerActivity(10144): No Crashlytics API key found. Visit http://crashlytics.com to set up an account.
02-28 12:44:35.867: D/dalvikvm(10144): GC_FOR_ALLOC freed 90K, 2% free 9391K/9520K, paused 16ms, total 17ms
02-28 12:44:35.887: I/OpenXcEnablerActivity(10144): OpenXC Enabler created
02-28 12:44:35.887: I/OpenXcEnablerActivity(10144): OpenXC Enabler resumed
02-28 12:44:35.907: I/VehicleManager(10144): Service starting
02-28 12:44:35.907: I/VehicleManager(10144): Binding to VehicleService
02-28 12:44:35.907: W/ContextImpl(10144): Implicit intents with startService are not safe: Intent { act=com.openxc.remote.VehicleServiceInterface } android.content.ContextWrapper.bindService:517 com.openxc.VehicleManager.bindRemote:665 com.openxc.VehicleManager.onCreate:151 
02-28 12:44:35.917: I/PreferenceManagerService(10144): Service starting
02-28 12:44:35.927: D/DeviceManager(10144): Initializing Bluetooth device manager
02-28 12:44:35.937: D/BluetoothAdapter(10144): 1106370640: getState() :  mService = null. Returning STATE_OFF
02-28 12:44:35.937: I/DeviceManager(10144): Starting Bluetooth discovery
02-28 12:44:35.937: D/BluetoothAdapter(10144): 1106370640: getState() :  mService = null. Returning STATE_OFF
02-28 12:44:35.937: I/VehicleManager(10144): Service binding in response to Intent { cmp=com.openxc.enabler/com.openxc.VehicleManager }
02-28 12:44:35.937: I/VehicleManager(10144): Binding to VehicleService
02-28 12:44:35.947: W/ContextImpl(10144): Implicit intents with startService are not safe: Intent { act=com.openxc.remote.VehicleServiceInterface } android.content.ContextWrapper.bindService:517 com.openxc.VehicleManager.bindRemote:665 com.openxc.VehicleManager.onBind:165 
02-28 12:44:35.967: I/VehicleService(10158): Service starting
02-28 12:44:35.967: I/VehicleService(10158): Service binding in response to Intent { act=com.openxc.remote.VehicleServiceInterface }
02-28 12:44:35.967: D/VehicleInterfaceFactory(10158): Constructing new instance of class com.openxc.interfaces.usb.UsbVehicleInterface with resource null
02-28 12:44:35.967: I/UsbVehicleInterface(10158): No USB device specified -- using default usb://1bc4/0001
02-28 12:44:35.977: D/UsbVehicleInterface(10158): Starting UsbVehicleInterface source
02-28 12:44:35.977: D/UsbVehicleInterface(10158): Looking for USB device with vendor ID 7108 and product ID 1
02-28 12:44:35.977: I/UsbVehicleInterface(10158): Unable to load USB device -- waiting for it to appear
02-28 12:44:35.977: I/UsbVehicleInterface(10158): com.openxc.sources.DataSourceResourceException: USB device with vendor ID 7108 and product ID 1 not found
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.interfaces.usb.UsbVehicleInterface.findDevice(UsbVehicleInterface.java:318)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.interfaces.usb.UsbVehicleInterface.connectToDevice(UsbVehicleInterface.java:255)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.interfaces.usb.UsbVehicleInterface.connectToDevice(UsbVehicleInterface.java:248)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.interfaces.usb.UsbVehicleInterface.initializeDevice(UsbVehicleInterface.java:217)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.interfaces.usb.UsbVehicleInterface.start(UsbVehicleInterface.java:140)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.interfaces.usb.UsbVehicleInterface.<init>(UsbVehicleInterface.java:96)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.interfaces.usb.UsbVehicleInterface.<init>(UsbVehicleInterface.java:124)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at java.lang.reflect.Constructor.constructNative(Native Method)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.interfaces.VehicleInterfaceFactory.build(VehicleInterfaceFactory.java:89)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.remote.VehicleService.addVehicleInterface(VehicleService.java:251)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.remote.VehicleService.addVehicleInterface(VehicleService.java:240)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.remote.VehicleService.initializeDefaultSources(VehicleService.java:153)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.openxc.remote.VehicleService.onBind(VehicleService.java:99)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at android.app.ActivityThread.handleBindService(ActivityThread.java:2598)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at android.app.ActivityThread.access$1900(ActivityThread.java:135)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at android.os.Handler.dispatchMessage(Handler.java:102)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at android.os.Looper.loop(Looper.java:136)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at android.app.ActivityThread.main(ActivityThread.java:5017)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at java.lang.reflect.Method.invokeNative(Native Method)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at java.lang.reflect.Method.invoke(Method.java:515)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
02-28 12:44:35.977: I/UsbVehicleInterface(10158):   at dalvik.system.NativeStart.main(Native Method)
02-28 12:44:35.977: I/VehicleService(10158): Added vehicle interface  UsbVehicleInterface{device=usb://1bc4/0001, connection=null, in_endpoint=null, out_endpoint=null}
02-28 12:44:35.997: I/Adreno-EGL(10144): <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
02-28 12:44:36.027: D/OpenGLRenderer(10144): Enabling debug mode 0
02-28 12:44:36.037: I/PreferenceManagerService(10144): Bound to VehicleManager
02-28 12:44:36.037: I/OpenXcEnablerActivity(10144): Bound to VehicleManager
02-28 12:44:36.037: I/VehicleManager(10144): Bound to VehicleService
02-28 12:44:36.047: D/dalvikvm(10144): GC_FOR_ALLOC freed 203K, 3% free 9702K/9936K, paused 13ms, total 13ms
02-28 12:44:36.047: I/VehicleManager(10144): Waiting for the VehicleService to bind to VehicleManager{remoteService=null}
02-28 12:44:36.047: I/VehicleManager(10144): com.openxc.remote.VehicleServiceInterface$Stub$Proxy@41f3d938 is now bound
02-28 12:44:36.047: I/VehicleManager(10144): Waiting for the VehicleService to bind to VehicleManager{remoteService=com.openxc.remote.VehicleServiceInterface$Stub$Proxy@41f3d938}
02-28 12:44:36.047: I/VehicleManager(10144): com.openxc.remote.VehicleServiceInterface$Stub$Proxy@41f3d938 is now bound
02-28 12:44:36.057: I/BluetoothPreferenceManager(10144): Enabling the Bluetooth vehicle interface
02-28 12:44:36.057: D/BluetoothPreferenceManager(10144): No Bluetooth vehicle interface selected -- starting in automatic mode
02-28 12:44:36.057: I/VehicleManager(10144): Adding interface: class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:44:36.057: I/VehicleService(10158): Adding listener com.openxc.remote.VehicleServiceListener$Stub$Proxy@41f409e8
02-28 12:44:36.057: D/VehicleInterfaceFactory(10158): Looking up class for name com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:44:36.057: D/VehicleInterfaceFactory(10158): Found class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:44:36.057: D/VehicleInterfaceFactory(10158): Constructing new instance of class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface with resource null
02-28 12:44:36.057: D/DeviceManager(10158): Initializing Bluetooth device manager
02-28 12:44:36.067: D/BluetoothVehicleInterface(10158): Bluetooth device polling is enabled
02-28 12:44:36.067: D/BluetoothVehicleInterface(10158): Starting BluetoothVehicleInterface source
02-28 12:44:36.067: I/BluetoothVehicleInterface(10158): Beginning polling for Bluetooth devices
02-28 12:44:36.067: V/BluetoothVehicleInterface(10158): Attempting automatic detection of Bluetooth VI
02-28 12:44:36.067: D/BluetoothVehicleInterface(10158): Socket accepter starting up
02-28 12:44:36.067: D/BluetoothVehicleInterface(10158): Initializing listening socket
02-28 12:44:36.067: I/VehicleService(10158): Added vehicle interface  BluetoothVehicleInterface{explicitDeviceAddress=null, connectedDeviceAddress=null, socket=null}
02-28 12:44:36.067: I/VehicleManager(10144): Enabling Bluetooth polling
02-28 12:44:36.067: W/BluetoothAdapter(10158): getBluetoothService() called with no BluetoothManagerCallback
02-28 12:44:36.067: E/BluetoothSocket(10158): bindListen fail, reason: bluetooth is off
02-28 12:44:36.067: I/FileRecordingPreferenceManager(10144): Setting recording to false
02-28 12:44:36.067: I/BluetoothVehicleInterface(10158): Listening for inbound socket connections
02-28 12:44:36.067: W/dalvikvm(10158): threadid=17: thread exiting with uncaught exception (group=0x4165bba8)
02-28 12:44:36.067: I/GpsOverwritePreferenceManager(10144): Setting native GPS overwriting to false
02-28 12:44:36.077: W/MockedLocationSink(10144): Unable to use mocked locations, insufficient privileges
02-28 12:44:36.077: W/MockedLocationSink(10144): java.lang.SecurityException: Requires ACCESS_MOCK_LOCATION secure setting
02-28 12:44:36.077: W/MockedLocationSink(10144):    at android.os.Parcel.readException(Parcel.java:1465)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at android.os.Parcel.readException(Parcel.java:1419)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at android.location.ILocationManager$Stub$Proxy.addTestProvider(ILocationManager.java:944)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at android.location.LocationManager.addTestProvider(LocationManager.java:1205)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at com.openxc.sinks.MockedLocationSink.setupMockLocations(MockedLocationSink.java:160)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at com.openxc.sinks.MockedLocationSink.<init>(MockedLocationSink.java:40)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at com.openxc.enabler.preferences.GpsOverwritePreferenceManager.setNativeGpsOverwriteStatus(GpsOverwritePreferenceManager.java:51)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at com.openxc.enabler.preferences.GpsOverwritePreferenceManager.access$0(GpsOverwritePreferenceManager.java:48)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at com.openxc.enabler.preferences.GpsOverwritePreferenceManager$1.readStoredPreferences(GpsOverwritePreferenceManager.java:42)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at com.openxc.enabler.preferences.VehiclePreferenceManager.setVehicleManager(VehiclePreferenceManager.java:33)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at com.openxc.enabler.preferences.PreferenceManagerService$1$1.run(PreferenceManagerService.java:91)
02-28 12:44:36.077: W/MockedLocationSink(10144):    at java.lang.Thread.run(Thread.java:841)
02-28 12:44:36.077: I/VehicleManager(10144): Adding data sink MockedLocationSink{enabled=false}
02-28 12:44:36.077: I/NativeGpsPreferenceManager(10144): Setting native GPS to false
02-28 12:44:36.077: I/UploadingPreferenceManager(10144): Setting uploading to false
02-28 12:44:36.077: I/NetworkPreferenceManager(10144): Setting network data source to false
02-28 12:44:36.077: I/VehicleManager(10144): Removing interface: class com.openxc.interfaces.network.NetworkVehicleInterface
02-28 12:44:36.077: D/VehicleInterfaceFactory(10158): Looking up class for name com.openxc.interfaces.network.NetworkVehicleInterface
02-28 12:44:36.077: D/VehicleInterfaceFactory(10158): Found class com.openxc.interfaces.network.NetworkVehicleInterface
02-28 12:44:36.077: I/TraceSourcePreferenceManager(10144): Setting trace data source to false
02-28 12:44:36.077: E/AndroidRuntime(10158): FATAL EXCEPTION: Thread-339
02-28 12:44:36.077: E/AndroidRuntime(10158): Process: com.openxc.enabler:remote, PID: 10158
02-28 12:44:36.077: E/AndroidRuntime(10158): java.lang.NullPointerException
02-28 12:44:36.077: E/AndroidRuntime(10158):    at com.openxc.interfaces.bluetooth.BluetoothVehicleInterface$SocketAccepter.run(BluetoothVehicleInterface.java:206)
02-28 12:44:36.077: E/AndroidRuntime(10158):    at java.lang.Thread.run(Thread.java:841)
02-28 12:44:38.510: W/VehicleManager(10144): VehicleService disconnected unexpectedly
02-28 12:44:38.510: W/RemoteListenerSource(10144): Unable to register to receive measurement callbacks
02-28 12:44:38.510: W/RemoteListenerSource(10144): android.os.DeadObjectException
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at android.os.BinderProxy.transact(Native Method)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at com.openxc.remote.VehicleServiceInterface$Stub$Proxy.unregister(VehicleServiceInterface.java:306)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at com.openxc.sources.RemoteListenerSource.stop(RemoteListenerSource.java:43)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at com.openxc.DataPipeline.removeSource(DataPipeline.java:141)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at com.openxc.VehicleManager$1.onServiceDisconnected(VehicleManager.java:652)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1115)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1129)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at android.os.Handler.handleCallback(Handler.java:733)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at android.os.Handler.dispatchMessage(Handler.java:95)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at android.os.Looper.loop(Looper.java:136)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at android.app.ActivityThread.main(ActivityThread.java:5017)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at java.lang.reflect.Method.invokeNative(Native Method)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at java.lang.reflect.Method.invoke(Method.java:515)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
02-28 12:44:38.510: W/RemoteListenerSource(10144):  at dalvik.system.NativeStart.main(Native Method)
02-28 12:44:38.510: I/VehicleManager(10144): Binding to VehicleService
02-28 12:44:38.510: W/ContextImpl(10144): Implicit intents with startService are not safe: Intent { act=com.openxc.remote.VehicleServiceInterface } android.content.ContextWrapper.bindService:517 com.openxc.VehicleManager.bindRemote:665 com.openxc.VehicleManager.access$13:658 
02-28 12:44:38.570: I/VehicleManager(10144): Bound to VehicleService
02-28 12:44:40.462: D/DeviceManager(10144): Initializing Bluetooth device manager
02-28 12:44:40.462: D/BluetoothAdapter(10144): 1106370640: getState() :  mService = null. Returning STATE_OFF
02-28 12:44:40.462: I/DeviceManager(10144): Starting Bluetooth discovery
02-28 12:44:40.462: D/BluetoothAdapter(10144): 1106370640: getState() :  mService = null. Returning STATE_OFF
02-28 12:44:40.462: I/VehicleManager(10144): Adding interface: class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:44:40.462: D/VehicleInterfaceFactory(10196): Looking up class for name com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:44:40.462: D/VehicleInterfaceFactory(10196): Found class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:44:40.462: D/VehicleInterfaceFactory(10196): Constructing new instance of class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface with resource null
02-28 12:44:40.462: D/DeviceManager(10196): Initializing Bluetooth device manager
02-28 12:44:40.472: D/BluetoothVehicleInterface(10196): Bluetooth device polling is enabled
02-28 12:44:40.472: D/BluetoothVehicleInterface(10196): Starting BluetoothVehicleInterface source
02-28 12:44:40.472: D/BluetoothVehicleInterface(10196): Socket accepter starting up
02-28 12:44:40.472: D/BluetoothVehicleInterface(10196): Initializing listening socket
02-28 12:44:40.472: I/VehicleService(10196): Added vehicle interface  BluetoothVehicleInterface{explicitDeviceAddress=null, connectedDeviceAddress=null, socket=null}
02-28 12:44:40.482: I/BluetoothVehicleInterface(10196): Beginning polling for Bluetooth devices
02-28 12:44:40.482: W/BluetoothAdapter(10196): getBluetoothService() called with no BluetoothManagerCallback
02-28 12:44:40.482: E/BluetoothSocket(10196): bindListen fail, reason: bluetooth is off
02-28 12:44:40.482: I/BluetoothVehicleInterface(10196): Listening for inbound socket connections
02-28 12:44:40.482: W/dalvikvm(10196): threadid=16: thread exiting with uncaught exception (group=0x4165bba8)
02-28 12:44:40.482: V/BluetoothVehicleInterface(10196): Attempting automatic detection of Bluetooth VI
02-28 12:44:40.482: E/AndroidRuntime(10196): FATAL EXCEPTION: Thread-342
02-28 12:44:40.482: E/AndroidRuntime(10196): Process: com.openxc.enabler:remote, PID: 10196
02-28 12:44:40.482: E/AndroidRuntime(10196): java.lang.NullPointerException
02-28 12:44:40.482: E/AndroidRuntime(10196):    at com.openxc.interfaces.bluetooth.BluetoothVehicleInterface$SocketAccepter.run(BluetoothVehicleInterface.java:206)
02-28 12:44:40.482: E/AndroidRuntime(10196):    at java.lang.Thread.run(Thread.java:841)
02-28 12:44:50.481: I/BluetoothVehicleInterface(10196): Beginning polling for Bluetooth devices
02-28 12:44:50.481: D/BluetoothVehicleInterface(10196): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:45:00.481: I/BluetoothVehicleInterface(10196): Beginning polling for Bluetooth devices
02-28 12:45:00.481: D/BluetoothVehicleInterface(10196): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:45:10.481: I/BluetoothVehicleInterface(10196): Beginning polling for Bluetooth devices
02-28 12:45:10.481: D/BluetoothVehicleInterface(10196): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:45:15.336: W/VehicleManager(10144): VehicleService disconnected unexpectedly
02-28 12:45:15.336: W/RemoteListenerSource(10144): Unable to register to receive measurement callbacks
02-28 12:45:15.336: W/RemoteListenerSource(10144): android.os.DeadObjectException
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at android.os.BinderProxy.transact(Native Method)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at com.openxc.remote.VehicleServiceInterface$Stub$Proxy.unregister(VehicleServiceInterface.java:306)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at com.openxc.sources.RemoteListenerSource.stop(RemoteListenerSource.java:43)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at com.openxc.DataPipeline.removeSource(DataPipeline.java:141)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at com.openxc.VehicleManager$1.onServiceDisconnected(VehicleManager.java:652)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1115)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1129)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at android.os.Handler.handleCallback(Handler.java:733)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at android.os.Handler.dispatchMessage(Handler.java:95)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at android.os.Looper.loop(Looper.java:136)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at android.app.ActivityThread.main(ActivityThread.java:5017)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at java.lang.reflect.Method.invokeNative(Native Method)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at java.lang.reflect.Method.invoke(Method.java:515)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
02-28 12:45:15.336: W/RemoteListenerSource(10144):  at dalvik.system.NativeStart.main(Native Method)
02-28 12:45:15.336: I/VehicleManager(10144): Binding to VehicleService
02-28 12:45:15.336: W/ContextImpl(10144): Implicit intents with startService are not safe: Intent { act=com.openxc.remote.VehicleServiceInterface } android.content.ContextWrapper.bindService:517 com.openxc.VehicleManager.bindRemote:665 com.openxc.VehicleManager.access$13:658 
02-28 12:45:15.406: I/VehicleManager(10144): Bound to VehicleService
02-28 12:45:38.548: D/DeviceManager(10144): Initializing Bluetooth device manager
02-28 12:45:38.548: D/BluetoothAdapter(10144): 1106370640: getState() :  mService = null. Returning STATE_OFF
02-28 12:45:38.548: I/DeviceManager(10144): Starting Bluetooth discovery
02-28 12:45:38.548: D/BluetoothAdapter(10144): 1106370640: getState() :  mService = null. Returning STATE_OFF
02-28 12:45:38.548: I/VehicleManager(10144): Adding interface: class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:45:38.558: D/VehicleInterfaceFactory(10245): Looking up class for name com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:45:38.558: D/VehicleInterfaceFactory(10245): Found class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface
02-28 12:45:38.558: D/VehicleInterfaceFactory(10245): Constructing new instance of class com.openxc.interfaces.bluetooth.BluetoothVehicleInterface with resource null
02-28 12:45:38.558: D/DeviceManager(10245): Initializing Bluetooth device manager
02-28 12:45:38.568: D/BluetoothVehicleInterface(10245): Bluetooth device polling is enabled
02-28 12:45:38.568: D/BluetoothVehicleInterface(10245): Starting BluetoothVehicleInterface source
02-28 12:45:38.568: I/VehicleService(10245): Added vehicle interface  BluetoothVehicleInterface{explicitDeviceAddress=null, connectedDeviceAddress=null, socket=null}
02-28 12:45:38.568: D/BluetoothVehicleInterface(10245): Socket accepter starting up
02-28 12:45:38.568: D/BluetoothVehicleInterface(10245): Initializing listening socket
02-28 12:45:38.568: W/BluetoothAdapter(10245): getBluetoothService() called with no BluetoothManagerCallback
02-28 12:45:38.568: E/BluetoothSocket(10245): bindListen fail, reason: bluetooth is off
02-28 12:45:38.568: I/BluetoothVehicleInterface(10245): Listening for inbound socket connections
02-28 12:45:38.568: W/dalvikvm(10245): threadid=16: thread exiting with uncaught exception (group=0x4165bba8)
02-28 12:45:38.568: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:45:38.568: V/BluetoothVehicleInterface(10245): Attempting automatic detection of Bluetooth VI
02-28 12:45:38.568: E/AndroidRuntime(10245): FATAL EXCEPTION: Thread-345
02-28 12:45:38.568: E/AndroidRuntime(10245): Process: com.openxc.enabler:remote, PID: 10245
02-28 12:45:38.568: E/AndroidRuntime(10245): java.lang.NullPointerException
02-28 12:45:38.568: E/AndroidRuntime(10245):    at com.openxc.interfaces.bluetooth.BluetoothVehicleInterface$SocketAccepter.run(BluetoothVehicleInterface.java:206)
02-28 12:45:38.568: E/AndroidRuntime(10245):    at java.lang.Thread.run(Thread.java:841)
02-28 12:45:48.578: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:45:48.578: D/BluetoothVehicleInterface(10245): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:45:58.578: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:45:58.578: D/BluetoothVehicleInterface(10245): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:46:08.578: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:46:08.578: D/BluetoothVehicleInterface(10245): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:46:18.577: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:46:18.577: D/BluetoothVehicleInterface(10245): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:46:28.577: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:46:28.577: D/BluetoothVehicleInterface(10245): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:46:28.577: D/BluetoothVehicleInterface(10245): Unable to connect after 6 attempts, slowing down attempts to every 60 seconds
02-28 12:47:28.576: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:47:28.576: D/BluetoothVehicleInterface(10245): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:48:28.584: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:48:28.584: D/BluetoothVehicleInterface(10245): No detected or stored Bluetooth device MAC, not attempting connection
02-28 12:49:28.583: I/BluetoothVehicleInterface(10245): Beginning polling for Bluetooth devices
02-28 12:49:28.583: D/BluetoothVehicleInterface(10245): No detected or stored Bluetooth device MAC, not attempting connection
peplin commented 10 years ago

Thanks, Zac. I see a NullPointerException we can watch out for but I'm wondering why it was trigger. I see this in the log:

02-28 12:44:40.482: E/BluetoothSocket(10196): bindListen fail, reason: bluetooth is off

Is Bluetooth enabled on your tablet? All the more reason to implement #112 if it's not.

zacnelson commented 10 years ago

Correct, bluetooth was not enabled. I agree that #112 should be implemented.

peplin commented 10 years ago

We are catching this exception properly now.