-
Notifications
You must be signed in to change notification settings - Fork 236
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
org.reactfx.util.SparseList throws java.util.NoSuchElementException when scrolling down fast with PageDown-Key #1104
Comments
Confirmed. Pressing and holding the up/down arrow keys trips the exception.
implementation 'org.controlsfx:controlsfx:11.2.0'
implementation 'org.fxmisc.richtext:richtextfx:0.11.2'
implementation 'org.fxmisc.flowless:flowless:0.7.2'
implementation 'org.fxmisc.wellbehaved:wellbehavedfx:0.3.3'
implementation 'com.miglayout:miglayout-javafx:11.2'
implementation 'com.dlsc.preferencesfx:preferencesfx-core:11.16.0'
implementation 'com.panemu:tiwulfx-dock:0.2' Trace:
Not sure why the exception isn't being swallowed. The code looks like the catch should return -1: try {
Cell<Paragraph<PS,SEG,S>, ParagraphBox<PS,SEG,S>> visibleCell = null;
if ( visibleParIndex > 0 ) visibleCell = virtualFlow.visibleCells().get( visibleParIndex );
else visibleCell = virtualFlow.getCellIfVisible( virtualFlow.getFirstVisibleIndex() )
.orElseGet( () -> virtualFlow.visibleCells().get( visibleParIndex ) );
return visibleCell.getNode().getIndex();
}
catch ( IndexOutOfBoundsException | NoSuchElementException EX )
{
return -1;
} |
@DarkTyger the provided code was only recently submitted for release 0.11.3. |
Version 0.11.3 released, and snapshots are now also available. |
That was fast, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
No exception should be thrown when scrolling
Actual Behavior
Exception is thrown when scrolling
Reproducible Demo
Using JavaKeywordsDemo, I've copied the preset text until I had about 600 lines of text. Then I maximize the window vertically (It seems to have something to do with render speed, the exception is not always thrown ...).
Then I jump to the start of the file, push PgDown and hold it down.
Text begins to scroll and after a few pages of scrolling ...
Environment info:
The text was updated successfully, but these errors were encountered: