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

fixed issue #7606 Searching for bibliographies and importing them triggers uncaught java.lang.IndexOutOfBoundsException #7665

Closed
wants to merge 5 commits into from

Conversation

Noname690
Copy link
Contributor

Fixes #7606

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at

Bug:

The parallelStream cause performSearch excute in a background thread and the Cleanup operation excute before the performSearch so it may cause an java.lang.IndexOutOfBoundsException.

The way to fix:

Use stream to instead of parallelStream and use a spinlock to prevent the Cleanup excute before the performSearch operation .
(In fact, I think use stream to instead of parallelStream can solve this problem and I test many times manually there are no bug in #7606 after this way. But I'm not sure whether this can solve the problem , could you offer me some suggestions !)

@Noname690 Noname690 changed the title fixed issue #7606 fixed issue #7606 Searching for bibliographies and importing them triggers uncaught java.lang.IndexOutOfBoundsException Apr 24, 2021
.map(cleanup::doPostCleanup)
.map(x-> {
while (!onPerformSucceed) {
Thread.onSpinWait();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ist this really necssary?

@Siedlerchr
Copy link
Member

Sorry, but you obviously didn't read my comment where I oultined a solution

@Siedlerchr Siedlerchr closed this Apr 26, 2021
@Noname690
Copy link
Contributor Author

Sorry sir ,I'm sorry I didn't understand your comment. And after reading your modification, I learned a lot from them. Thank you very much for the reply.

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

Successfully merging this pull request may close these issues.

Seaching for bibliographies and importing them triggers uncaught java.lang.IndexOutOfBoundsException
2 participants