jfx icon indicating copy to clipboard operation
jfx copied to clipboard

JDK-8146918: ConcurrentModificationException in MediaPlayer

Open n-gabe opened this issue 1 year ago • 4 comments
trafficstars

There is a ConcurrentModificationException in MediaPlayer when removing a MediaView from it. The root cause is that you can't iterate over a HashSet with for (WeakReference<MediaView> vref : viewRefs) and removing items from the collection by viewRefs.remove(vref); within this loop.


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Error

 ⚠️ OCA signatory status must be verified

Issue

  • JDK-8146918: ConcurrentModificationException in MediaPlayer (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1377/head:pull/1377
$ git checkout pull/1377

Update a local copy of the PR:
$ git checkout pull/1377
$ git pull https://git.openjdk.org/jfx.git pull/1377/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1377

View PR using the GUI difftool:
$ git pr show -t 1377

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1377.diff

n-gabe avatar Feb 22 '24 17:02 n-gabe

Hi @n-gabe, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user n-gabe" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

bridgekeeper[bot] avatar Feb 22 '24 17:02 bridgekeeper[bot]

/signed

n-gabe avatar Feb 22 '24 17:02 n-gabe

Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

bridgekeeper[bot] avatar Feb 22 '24 17:02 bridgekeeper[bot]

@n-gabe Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

openjdk[bot] avatar Feb 22 '24 17:02 openjdk[bot]

@n-gabe This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8146918: ConcurrentModificationException in MediaPlayer

Reviewed-by: almatvee

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 69 new commits pushed to the master branch:

  • e72d681fbe3b00a40db5a2068f11f2d3420f9432: 8330701: Fix Eclipse project in tests/manual/text
  • 3333740f1faa5459027f5d078241ce0dc3a9f9cf: 8328577: Toolbar's overflow button overlaps the items
  • 5182ea16ace78c4f61e2c38981aab62f6153294e: 8322251: [Linux] JavaFX is not displaying CJK on Ubuntu 23.10 and later
  • d03b0028d1ebefa00df59a20d6f9a4dd9ac5f033: 8242553: IntegerSpinner and DoubleSpinner do not wrap around values correctly in some cases
  • f27077b958145aa3a1991cdf7749505b24994709: Merge
  • c721a4be906cf3b7b43b779e33eaee4c80bbfa25: Merge
  • 5482b84697c404fd14a4b9d09ffcb4f3f8400e6c: Merge
  • 3914db26f3abb573ed0e320a361477e1d3e7a9ac: Merge
  • 34c9dcb82f5a3c445ae66f9738da0c7508438efa: Merge
  • 0aaaa95edecb23d3892c635796d0bbeff59cbc87: Merge
  • ... and 59 more: https://git.openjdk.org/jfx/compare/e0b88bc7cfede46afe28cbb4a2e333df933b5100...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@sashamatveev) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

openjdk[bot] avatar Mar 13 '24 20:03 openjdk[bot]

@n-gabe This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Apr 10 '24 21:04 bridgekeeper[bot]

Webrevs

mlbridge[bot] avatar Apr 18 '24 21:04 mlbridge[bot]

Do we have a test application to reproduce this issue? I tired to create one based on bug description, but was not able to reproduce issue.

sashamatveev avatar Apr 19 '24 00:04 sashamatveev

You may use this simple showcase: https://github.com/n-gabe/jfx-two-media-view-sample

n-gabe avatar Apr 19 '24 08:04 n-gabe

Sure, done.

n-gabe avatar Apr 21 '24 14:04 n-gabe

@n-gabe This is now ready for you to /integrate

kevinrushforth avatar Apr 24 '24 20:04 kevinrushforth

Thanks, please /integrate

n-gabe avatar Apr 25 '24 04:04 n-gabe

/integrate

n-gabe avatar Apr 25 '24 04:04 n-gabe

@n-gabe Your change (at version 89c56d293264f49724386394d423943ee41d8678) is now ready to be sponsored by a Committer.

openjdk[bot] avatar Apr 25 '24 04:04 openjdk[bot]

/sponsor

kevinrushforth avatar Apr 25 '24 12:04 kevinrushforth

Going to push as commit d8ca38a6b7ed918318b956add150a5ae9c4c0981. Since your change was applied there have been 69 commits pushed to the master branch:

  • e72d681fbe3b00a40db5a2068f11f2d3420f9432: 8330701: Fix Eclipse project in tests/manual/text
  • 3333740f1faa5459027f5d078241ce0dc3a9f9cf: 8328577: Toolbar's overflow button overlaps the items
  • 5182ea16ace78c4f61e2c38981aab62f6153294e: 8322251: [Linux] JavaFX is not displaying CJK on Ubuntu 23.10 and later
  • d03b0028d1ebefa00df59a20d6f9a4dd9ac5f033: 8242553: IntegerSpinner and DoubleSpinner do not wrap around values correctly in some cases
  • f27077b958145aa3a1991cdf7749505b24994709: Merge
  • c721a4be906cf3b7b43b779e33eaee4c80bbfa25: Merge
  • 5482b84697c404fd14a4b9d09ffcb4f3f8400e6c: Merge
  • 3914db26f3abb573ed0e320a361477e1d3e7a9ac: Merge
  • 34c9dcb82f5a3c445ae66f9738da0c7508438efa: Merge
  • 0aaaa95edecb23d3892c635796d0bbeff59cbc87: Merge
  • ... and 59 more: https://git.openjdk.org/jfx/compare/e0b88bc7cfede46afe28cbb4a2e333df933b5100...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Apr 25 '24 12:04 openjdk[bot]

@kevinrushforth @n-gabe Pushed as commit d8ca38a6b7ed918318b956add150a5ae9c4c0981.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar Apr 25 '24 12:04 openjdk[bot]