title: "Bluetooth Share has stopped" alert when detecting iBeacons on Android
body: <p>I'm using <a href="https://github.com/RadiusNetworks/android-ibeacon-service" rel="nofollow">Android iBeacon Library</a> from Radius Networks to play with iBeacons. After some time I see constantly alerts popping out of the blue: "Unfortunately, Bluetooth Share has stopped." with [Report] [OK] buttons.</p>
  
  <p>Phone: Nexus 5 with Android 4.4.2.</p>
  
  <p>That's a bummer since Nexus 5 is currently top Android phone and using iBeacons seems not working after some time. That means that iBeacons cannot be used in production as Bluetooth LE does not work properly on Android (even on the newest release).</p>
  
  <p>Only factory reset seems to fix the problem and I cannot ask users of my app to do so :/.</p>
  
  <p>Logcat:</p>
  
  <pre><code>I/DEBUG   (  175): Build fingerprint: 'google/hammerhead/hammerhead:4.4.2/KOT49H/937116:user/release-keys'
  I/DEBUG   (  175): Revision: '11'
  I/DEBUG   (  175): pid: 5062, tid: 5085, name: BTIF  &gt;&gt;&gt; com.android.bluetooth &lt;&lt;&lt;
  I/DEBUG   (  175): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
  I/DEBUG   (  175):     r0 ffffffff  r1 00007d00  r2 00007c60  r3 74ddc308
  I/DEBUG   (  175):     r4 74ddc318  r5 00000000  r6 7568ea60  r7 7512d595
  I/DEBUG   (  175):     r8 00000002  r9 7568ea54  sl 751638cd  fp 00000004
  I/DEBUG   (  175):     ip 00000000  sp 7568ea10  lr 750ad68d  pc 750ad6b0  cpsr 600f0030
  I/DEBUG   (  175):     d0  000000000000000f  d1  746f6d65725f6464
  I/DEBUG   (  175):     d2  000000cc00000069  d3  754bde5000000066
  I/DEBUG   (  175):     d4  0034003a00440045  d5  00390033003a0033
  I/DEBUG   (  175):     d6  003a00370038003a  d7  0030003a00380034
  I/DEBUG   (  175):     d8  0000000000000000  d9  0000000000000000
  I/DEBUG   (  175):     d10 0000000000000000  d11 0000000000000000
  I/DEBUG   (  175):     d12 0000000000000000  d13 0000000000000000
  I/DEBUG   (  175):     d14 0000000000000000  d15 0000000000000000
  I/DEBUG   (  175):     d16 3fe8000000000000  d17 3fc999999999999a
  I/DEBUG   (  175):     d18 0000000000000000  d19 0000000000000000
  I/DEBUG   (  175):     d20 0000000000000000  d21 0000004400000044
  I/DEBUG   (  175):     d22 0000000000000000  d23 0000000000000000
  I/DEBUG   (  175):     d24 0000000000000000  d25 0002a7600002a760
  I/DEBUG   (  175):     d26 0707070703030303  d27 0300000004000000
  I/DEBUG   (  175):     d28 0800000009000000  d29 0001000000010000
  I/DEBUG   (  175):     d30 010b400001088000  d31 01108000010e0000
  I/DEBUG   (  175):     scr 60000010
  I/DEBUG   (  175): 
  I/DEBUG   (  175): backtrace:
  I/DEBUG   (  175):     #00  pc 0004e6b0  /system/lib/hw/bluetooth.default.so
  I/DEBUG   (  175):     #01  pc 0004ea89  /system/lib/hw/bluetooth.default.so (btif_config_set+156)
  I/DEBUG   (  175):     #02  pc 0004eb91  /system/lib/hw/bluetooth.default.so (btif_config_set_int+20)
  I/DEBUG   (  175):     #03  pc 000345cd  /system/lib/hw/bluetooth.default.so (btif_storage_set_remote_addr_type+36)
  I/DEBUG   (  175):     #04  pc 0004adbd  /system/lib/hw/bluetooth.default.so
  I/DEBUG   (  175):     #05  pc 0002f091  /system/lib/hw/bluetooth.default.so
  I/DEBUG   (  175):     #06  pc 000553bd  /system/lib/hw/bluetooth.default.so (gki_task_entry+92)
  I/DEBUG   (  175):     #07  pc 0000d170  /system/lib/libc.so (__thread_entry+72)
  I/DEBUG   (  175):     #08  pc 0000d308  /system/lib/libc.so (pthread_create+240)
  I/DEBUG   (  175): 
  I/DEBUG   (  175): stack:
  I/DEBUG   (  175):          7568e9d0  00000000  
  I/DEBUG   (  175):          7568e9d4  4156f52d  /system/lib/libdvm.so
  I/DEBUG   (  175):          7568e9d8  00004000  
  I/DEBUG   (  175):          7568e9dc  7568ea71  [stack:5085]
  I/DEBUG   (  175):          7568e9e0  415d70d0  
  I/DEBUG   (  175):          7568e9e4  7fffffee  
  I/DEBUG   (  175):          7568e9e8  75587bd0  [anon:libc_malloc]
  I/DEBUG   (  175):          7568e9ec  000007c6  
  I/DEBUG   (  175):          7568e9f0  74ddc318  [anon:libc_malloc]
  I/DEBUG   (  175):          7568e9f4  00007c60  
  I/DEBUG   (  175):          7568e9f8  00007c60  
  I/DEBUG   (  175):          7568e9fc  74ddc308  [anon:libc_malloc]
  I/DEBUG   (  175):          7568ea00  74ddc318  [anon:libc_malloc]
  I/DEBUG   (  175):          7568ea04  000007c6  
  I/DEBUG   (  175):          7568ea08  7568ea60  [stack:5085]
  I/DEBUG   (  175):          7568ea0c  750ad68d  /system/lib/hw/bluetooth.default.so
  I/DEBUG   (  175):     #00  7568ea10  00000041  
  I/DEBUG   (  175):          7568ea14  7512f561  /system/lib/hw/bluetooth.default.so
  I/DEBUG   (  175):          7568ea18  7568ea60  [stack:5085]
  I/DEBUG   (  175):          7568ea1c  750ada8d  /system/lib/hw/bluetooth.default.so (btif_config_set+160)
  I/DEBUG   (  175):     #01  7568ea20  7568ea54  [stack:5085]
  I/DEBUG   (  175):          7568ea24  7568ea54  [stack:5085]
  I/DEBUG   (  175):          7568ea28  00000001  
  I/DEBUG   (  175):          7568ea2c  00000001  
  I/DEBUG   (  175):          7568ea30  764b890a  [anon:libc_malloc]
  I/DEBUG   (  175):          7568ea34  40146384  
  I/DEBUG   (  175):          7568ea38  7516ea94  
  I/DEBUG   (  175):          7568ea3c  00000007  
  I/DEBUG   (  175):          7568ea40  7512dff5  /system/lib/hw/bluetooth.default.so
  I/DEBUG   (  175):          7568ea44  750adb95  /system/lib/hw/bluetooth.default.so (btif_config_set_int+24)
  I/DEBUG   (  175):     #02  7568ea48  00000004  
  I/DEBUG   (  175):          7568ea4c  00000002  
  I/DEBUG   (  175):          7568ea50  7512f561  /system/lib/hw/bluetooth.default.so
  I/DEBUG   (  175):          7568ea54  00000001  
  I/DEBUG   (  175):          7568ea58  40146384  
  I/DEBUG   (  175):          7568ea5c  750935d1  /system/lib/hw/bluetooth.default.so (btif_storage_set_remote_addr_type+40)
  </code></pre>