Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception that actives with a massive number of Bluetooth signals (beacon and smatphone) #323

Closed
Kain86 opened this issue Dec 13, 2015 · 2 comments

Comments

@Kain86
Copy link

Kain86 commented Dec 13, 2015

Tested with more devices (samsung smartphone and tablet with OS 4.4.2 and 5) when start scan, the app, after few seconds, crashes with this error:

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=62; index=62
at org.altbeacon.beacon.BeaconParser.byteArraysMatch(BeaconParser.java:777)
at org.altbeacon.beacon.BeaconParser.fromScanData(BeaconParser.java:416)
at org.altbeacon.beacon.BeaconParser.fromScanData(BeaconParser.java:373)
at org.altbeacon.beacon.service.BeaconService$ScanProcessor.doInBackground(BeaconService.java:457)
at org.altbeacon.beacon.service.BeaconService$ScanProcessor.doInBackground(BeaconService.java:442)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)

@davidgyoung
Copy link
Member

The stack trace indicates that the library crashed trying to process malformed Bluetooth LE packet. There is a flaw in line BeaconParser.java:777 in the byteArraysMatch method that overflows an array in certain cases.

Caused by: javalangArrayIndexOutOfBoundsException: length=62; index=62
at orgaltbeaconbeaconBeaconParserbyteArraysMatch(BeaconParserjava:777)
at org.altbeacon.beacon.BeaconParser.fromScanData(BeaconParser.java:416)

@davidgyoung
Copy link
Member

Fixed in #324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants