Index was outside the bounds of the array
See original GitHub issueThe 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
- Start scan devices
- Wait
- 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:
- Created 2 months ago
- Comments:13 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix is available in 3.0.0-beta.5.
Well, there are various nuances of “published to nuget”. In this project we have the following:
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) …