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

Version 9.1 - Bug in VisionPortalImpl.close() #942

Closed
25wangj opened this issue Feb 17, 2024 · 3 comments
Closed

Version 9.1 - Bug in VisionPortalImpl.close() #942

25wangj opened this issue Feb 17, 2024 · 3 comments

Comments

@25wangj
Copy link

25wangj commented Feb 17, 2024

When VisionPortalImpl tries to remove cameraMonitorViewId from viewsInUse, it uses ArrayList.remove(int) instead of ArrayList.remove(Object). This causes an IndexOutOfBoundsError. Line 663 of VisionPortalImpl should change from:

viewsInUse.remove(cameraMonitorViewId);

to

viewsInUse.remove(Integer.valueOf(cameraMonitorViewId));

If other people think this is correct I will submit a PR.

@25wangj 25wangj changed the title Bug in VisionPortalImpl.close() Version 9.1 - Bug in VisionPortalImpl.close() Feb 17, 2024
@Windwoes
Copy link
Member

Ooops. Yes, that is correct. Unfortunately, the deploy model of the SDK does not facilitate the acceptance of PRs against this repo.

A workaround for now would be to (a) stop streaming but not actually close the portal if you're doing it to save resources, or (b) simply allow the built-in clean up to run its course.

@Windwoes
Copy link
Member

NB: this was missed in testing because the usage of close() in the samples did not trigger a crash display, which in and of itself is a bug. That is, this bug was masked in the samples by the presence of another bug.

@Windwoes
Copy link
Member

This was fixed in v9.2

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