Skip to content

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

Closed

Description

@25wangj

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.

Activity

  1. changed the title [-]Bug in VisionPortalImpl.close()[/-] [+]Version 9.1 - Bug in VisionPortalImpl.close()[/+] on Feb 17, 2024
  2. Windwoes commented on Feb 17, 2024

    @Windwoes
    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.

  3. Windwoes commented on Feb 25, 2024

    @Windwoes
    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.

  4. Windwoes commented on Aug 11, 2024

    @Windwoes
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions