java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null

Appcelerator JIRA | Brian García | 8 months ago
  1. 0

    Trying to implement BLE scanner the following error is returned: {code:java} [ERROR] : HyperloopProxy: (main) [828,2867] Exception thrown during invocation of method: public boolean android.bluetooth.BluetoothAdapter.startLeScan(android.bluetooth.BluetoothAdapter$LeScanCallback), args: [null] [ERROR] : HyperloopProxy: java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null [ERROR] : HyperloopProxy: at $Proxy0.hashCode(Unknown Source) [ERROR] : HyperloopProxy: at java.util.Collections.secondaryHash(Collections.java:3405) [ERROR] : HyperloopProxy: at java.util.HashMap.containsKey(HashMap.java:325) [ERROR] : HyperloopProxy: at android.bluetooth.BluetoothAdapter.startLeScan(BluetoothAdapter.java:2189) [ERROR] : HyperloopProxy: at android.bluetooth.BluetoothAdapter.startLeScan(BluetoothAdapter.java:2157) [ERROR] : HyperloopProxy: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : HyperloopProxy: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : HyperloopProxy: at hyperloop.BaseProxy.invokeMethod(BaseProxy.java:133) [ERROR] : HyperloopProxy: at hyperloop.BaseProxy.callNativeFunction(BaseProxy.java:115) [ERROR] : HyperloopProxy: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR] : HyperloopProxy: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [ERROR] : HyperloopProxy: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:918) [ERROR] : HyperloopProxy: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1141) [ERROR] : HyperloopProxy: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] : HyperloopProxy: at ti.modules.titanium.ui.widget.listview.ListViewProxy.handleMessage(ListViewProxy.java:312) [ERROR] : HyperloopProxy: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : HyperloopProxy: at android.os.Looper.loop(Looper.java:145) [ERROR] : HyperloopProxy: at android.app.ActivityThread.main(ActivityThread.java:5951) [ERROR] : HyperloopProxy: at java.lang.reflect.Method.invoke(Native M [ERROR] : HyperloopProxy: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : HyperloopProxy: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) [ERROR] : HyperloopProxy: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) {code} and Code to reproduce: {code:java} var BluetoothManager = require('android.bluetooth.BluetoothManager'), BluetoothDevice = require('android.bluetooth.BluetoothDevice'), Context = require('android.content.Context') LeScanCallback = require('android.bluetooth.BluetoothAdapter.LeScanCallback'), Activity = require('android.app.Activity'), activity = new Activity(Ti.Android.currentActivity); var bm = BluetoothManager.cast(activity.getSystemService(Context.BLUETOOTH_SERVICE)); var bluetoothAdapter = bm.getAdapter(); console.log(bluetoothAdapter.isEnabled()); var scanCallback = new LeScanCallback({ onLeScan : function(device, rssi, data) { console.log('startScan'); ​ } }); bluetoothAdapter.startLeScan(scanCallback); {code}

    Appcelerator JIRA | 8 months ago | Brian García
    java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null
  2. 0

    Trying to implement BLE scanner the following error is returned: {code:java} [ERROR] : HyperloopProxy: (main) [828,2867] Exception thrown during invocation of method: public boolean android.bluetooth.BluetoothAdapter.startLeScan(android.bluetooth.BluetoothAdapter$LeScanCallback), args: [null] [ERROR] : HyperloopProxy: java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null [ERROR] : HyperloopProxy: at $Proxy0.hashCode(Unknown Source) [ERROR] : HyperloopProxy: at java.util.Collections.secondaryHash(Collections.java:3405) [ERROR] : HyperloopProxy: at java.util.HashMap.containsKey(HashMap.java:325) [ERROR] : HyperloopProxy: at android.bluetooth.BluetoothAdapter.startLeScan(BluetoothAdapter.java:2189) [ERROR] : HyperloopProxy: at android.bluetooth.BluetoothAdapter.startLeScan(BluetoothAdapter.java:2157) [ERROR] : HyperloopProxy: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : HyperloopProxy: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : HyperloopProxy: at hyperloop.BaseProxy.invokeMethod(BaseProxy.java:133) [ERROR] : HyperloopProxy: at hyperloop.BaseProxy.callNativeFunction(BaseProxy.java:115) [ERROR] : HyperloopProxy: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR] : HyperloopProxy: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [ERROR] : HyperloopProxy: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:918) [ERROR] : HyperloopProxy: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1141) [ERROR] : HyperloopProxy: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] : HyperloopProxy: at ti.modules.titanium.ui.widget.listview.ListViewProxy.handleMessage(ListViewProxy.java:312) [ERROR] : HyperloopProxy: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : HyperloopProxy: at android.os.Looper.loop(Looper.java:145) [ERROR] : HyperloopProxy: at android.app.ActivityThread.main(ActivityThread.java:5951) [ERROR] : HyperloopProxy: at java.lang.reflect.Method.invoke(Native M [ERROR] : HyperloopProxy: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : HyperloopProxy: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) [ERROR] : HyperloopProxy: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) {code} and Code to reproduce: {code:java} var BluetoothManager = require('android.bluetooth.BluetoothManager'), BluetoothDevice = require('android.bluetooth.BluetoothDevice'), Context = require('android.content.Context') LeScanCallback = require('android.bluetooth.BluetoothAdapter.LeScanCallback'), Activity = require('android.app.Activity'), activity = new Activity(Ti.Android.currentActivity); var bm = BluetoothManager.cast(activity.getSystemService(Context.BLUETOOTH_SERVICE)); var bluetoothAdapter = bm.getAdapter(); console.log(bluetoothAdapter.isEnabled()); var scanCallback = new LeScanCallback({ onLeScan : function(device, rssi, data) { console.log('startScan'); ​ } }); bluetoothAdapter.startLeScan(scanCallback); {code}

    Appcelerator JIRA | 8 months ago | Brian García
    java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null
  3. 0

    OverflowError: Python int too large to convert to C long on ART

    GitHub | 2 years ago | Davideddu
    java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    OverflowError: Python int too large to convert to C long [android lollipop]

    GitHub | 2 years ago | po9794
    java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null
  6. 0

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

    GitHub | 2 months ago | brentpicasso
    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

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Expected to unbox a 'int' primitive type but was returned null

      at $Proxy0.hashCode()
    2. Unknown
      $Proxy0.hashCode
      1. $Proxy0.hashCode(Unknown Source)
      1 frame
    3. Java RT
      HashMap.containsKey
      1. java.util.Collections.secondaryHash(Collections.java:3405)
      2. java.util.HashMap.containsKey(HashMap.java:325)
      2 frames
    4. Android Platform
      BluetoothAdapter.startLeScan
      1. android.bluetooth.BluetoothAdapter.startLeScan(BluetoothAdapter.java:2189)
      2. android.bluetooth.BluetoothAdapter.startLeScan(BluetoothAdapter.java:2157)
      2 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. hyperloop
      BaseProxy.callNativeFunction
      1. hyperloop.BaseProxy.invokeMethod(BaseProxy.java:133)
      2. hyperloop.BaseProxy.callNativeFunction(BaseProxy.java:115)
      2 frames
    7. org.appcelerator.kroll
      KrollProxy.handleMessage
      1. org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
      2. org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
      3. org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:918)
      4. org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1141)
      4 frames
    8. org.appcelerator.titanium
      TiViewProxy.handleMessage
      1. org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356)
      1 frame
    9. ti.modules.titanium
      ListViewProxy.handleMessage
      1. ti.modules.titanium.ui.widget.listview.ListViewProxy.handleMessage(ListViewProxy.java:312)
      1 frame
    10. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:98)
      2. android.os.Looper.loop(Looper.java:145)
      3. android.app.ActivityThread.main(ActivityThread.java:5951)
      3 frames