question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Index was outside the bounds of the array

See original GitHub issue

The app crashes when trying to scan devices. This happens on the client device. Repeats only for one user. I managed to get logs from him by sending him a debug version of the program.

Steps to reproduce

  1. Start scan devices
  2. Wait
  3. App crushed after some seconds

Expected behavior

App should work

Actual behavior

App crashes

Crashlog

Index was outside the bounds of the array.
  at Plugin.BLE.Android.Device.ParseScanRecord (System.Byte[] scanRecord) [0x00020] in <e84f194db96045279f39298a58a796ea>:0 
  at Plugin.BLE.Android.Device..ctor (Plugin.BLE.Android.Adapter adapter, Android.Bluetooth.BluetoothDevice nativeDevice, Android.Bluetooth.BluetoothGatt gatt, System.Int32 rssi, System.Byte[] advertisementData) [0x00017] in <e84f194db96045279f39298a58a796ea>:0 
  at Plugin.BLE.Android.Adapter+Api21BleScanCallback.OnScanResult (Android.Bluetooth.LE.ScanCallbackType callbackType, Android.Bluetooth.LE.ScanResult result) [0x00026] in <e84f194db96045279f39298a58a796ea>:0 
  at Android.Bluetooth.LE.ScanCallback.n_OnScanResult_ILandroid_bluetooth_le_ScanResult_ (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 native_callbackType, System.IntPtr native_result) [0x00011] in <5437bca4f0e742d0a18eb9a3847ccdb6>:0 
  at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1(intptr,intptr,int,intptr)

Configuration

Version of the Plugin: 2.1.3

Platform: Android 13 (One UI 5.1)

Device: Samsung Galaxy S21 FE 5G, model: SM-G990E/DS

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
januswcommented, Aug 5, 2023

The fix is available in 3.0.0-beta.5.

0reactions
januswcommented, Aug 5, 2023

@janusw Can an issue be considered closed if the update is not published to nuget?

Well, there are various nuances of “published to nuget”. In this project we have the following:

  • stable releases on nuget.org
  • beta releases on nuget.org
  • automatic builds on GitHub Actions (for every PR and every push to master)

Which one you want to use depends on your preference and use case.

I consider an issue “fixed” as soon as the fix is merged to master (which implies the availability of an auto-built nupkg that you can download and use locally).

In any case, I’ll tag a new beta release today (which will also be uploaded to nuget.org) …

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error : Index was outside the bounds of the array. [duplicate]
You have declared an array that can store 8 elements not 9. this.posStatus = new int[8];. It means postStatus will contain 8 elements...
Read more >
How to Fix the Array Index Out Of Bounds Exception in Java
The ArrayIndexOutOfBoundsException is a runtime exception in Java that occurs when an array is accessed with an illegal index.
Read more >
Assign : Index was outside the bounds of the array - Help
to give a bit more detail this error occurs when you are trying to access an index outside of the current bounds of...
Read more >
Was Outside the Bounds of the Array: An In-depth Guide
The index was outside the bounds of the array Visual Studio bug is caused when your document has declared arrays that cannot store...
Read more >
was outside the bounds of the array in the Virtual Terminal ...
This error is returned by email when a file import fails because of invalid formatting. More specifically, it typically indicates that one or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found