Skip to content

Scene update error when closing a stage that has a popup. #67

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

Closed
ghost opened this issue Jul 6, 2014 · 2 comments
Closed

Scene update error when closing a stage that has a popup. #67

ghost opened this issue Jul 6, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 6, 2014

Hi Tomas, I have an editor with a rich text area using a popup.

The editor is made in such a way that there can be multiple text editing areas. Each area comes as its own scene (from an FXML).

So in my setup there can be multiple popups per editing area/scene.

I noticed that if I close the stage of my editor when a pop up is showing, I get this error below. If close with no popup showing, i don't get an error. I am not sure if this is something I can fix on my end. Any help would be greatly appreciated :D
This is the error (seems like it is related to scene update):

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at com.sun.javafx.tk.quantum.WindowStage.setBounds(WindowStage.java:288)
at javafx.stage.Window$TKBoundsConfigurator.apply(Window.java:1171)
at javafx.stage.Window$TKBoundsConfigurator.pulse(Window.java:1187)
at com.sun.javafx.tk.Toolkit$3.run(Toolkit.java:321)
at com.sun.javafx.tk.Toolkit$3.run(Toolkit.java:319)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:319)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:345)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
at     com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
at java.lang.Thread.run(Thread.java:745)

this error keeps getting printed to the output consol.

this is the java code where the error happens (WindowStage.java:288) at the platformWindow.setBounds() method:

 @Override public void setBounds(float x, float y, boolean xSet, boolean ySet,
                                float w, float h, float cw, float ch,
                                float xGravity, float yGravity)
{
    if (isAppletStage) {
        xSet = ySet = false;
    }
    platformWindow.setBounds((int)x, (int)y, xSet, ySet, 
                             (int)w, (int)h, (int)cw, (int)ch, 
                             xGravity, yGravity);
}

Is this because of my editor setup (editor scene, loading text-editing area scene)?

@TomasMikula
Copy link
Member

Hi Maher, I honestly don't know, but it does not look related to RichTextFX. Could be a bug in JavaFX or some weird setup on your side. Do you get the same error if you don't set the popup window on the text area at all?

@ghost
Copy link
Author

ghost commented Jul 6, 2014

Ok after further testing, it seems like the issue is in the PopOver from
ControlsFX. To trouble shoot I did this:

-set PopOver to show using editor stage, to text area scene, to text
area itself. and got error on all. this in both cases popover set on
text area itself or on the editor.
-When changed to standard java Popup, got it to work in all above cases.

so I guess it is the PopOver class... I'll report this on the ControlsFX
site!

I think it has to do with my setup.

On 06/07/2014 3:03 PM, TomasMikula wrote:

Hi Maher, I honestly don't know, but it does not look related to
RichTextFX. Could be a bug in JavaFX or some weird setup on your side.
Do you get the same error if you don't set the popup window on the
text area at all?


Reply to this email directly or view it on GitHub
#67 (comment).

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

No branches or pull requests

1 participant