-
Notifications
You must be signed in to change notification settings - Fork 237
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
IndexOutOfBoundsException when editor is not shown but updated #637
Comments
This seems very similar to #579. |
Just FYI. I can't reproduce the bug with the following TestFX test, which seems to follow the directions you specify: import com.nitorcreations.junit.runners.NestedRunner;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.stage.Stage;
import org.fxmisc.richtext.InlineCssTextArea;
import org.fxmisc.richtext.InlineCssTextAreaAppTest;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(NestedRunner.class)
public class MiscellaneousTests {
public class InvisibleUpdateTests extends InlineCssTextAreaAppTest {
TabPane pane;
@Override
public void start(Stage stage) throws Exception {
area = new InlineCssTextArea("some example\n text to go here\n across a couple of \n lines....");
pane = new TabPane(
new Tab("main area", area),
new Tab("other tab", new Label("some text"))
);
scene = new Scene(pane);
this.stage = stage;
stage.setScene(scene);
stage.setWidth(400);
stage.setHeight(400);
stage.show();
// select the area's tab
pane.getSelectionModel().select(0);
}
@Test
public void test() {
// when select a different tab (label's tab)
// so that area is no longer visible
pane.getSelectionModel().select(1);
// WaitForAsyncUtils.waitForFxEvents();
// and update the area in some way (e.g. clearing its text)
interact(() -> area.clear());
// no exception should be thrown
}
}
} |
@JordanMartinez Thank you very much for having a look at the problem! I tried to cook up a minimal example that displays the error and on the way realized it actually was not a problem with different tabs or the update while being invisible. The issue (and a lot of different related stuff) was actually caused by running |
Glad you figured out the problem. I agree with your suggestion and have opened a new issue for it. |
RTF: 0.8.1
OS: Windows
We get an
IndexOutOfBoundsException
in the following situation:TabPane
controlclear
method)Sorry for being a bit vague at the moment. I'll try to provide a minimal non-working example soon, but maybe the information provided so far is enough for you to already locate the issue.
The text was updated successfully, but these errors were encountered: