JDK-8123706 : Menu now breaks 3D rendering of nodes(build 94 issue)
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-06-20
  • Updated: 2015-06-17
  • Resolved: 2013-07-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Relates :  
Description
http://s1139.photobucket.com/user/ThekonradZuse/media/Coding/Video6_zps58102da7.mp4.html

If I get rid of my menu it works, or else it looks like this.  The last Version I used was 89, so I'm not sure if this is new to this build or not.

private MenuBar menu()
    {
        MenuBar menuBar = new MenuBar();


        Menu menuFile = new Menu("File");
        Menu menuEdit = new Menu("Edit");
        Menu menuView = new Menu("View");

        MenuItem menuItemOpen = new MenuItem("Open");
        MenuItem menuItemSave = new MenuItem("Save");
        
        menuItemOpen.setOnAction((ActionEvent ae)
     -> {
             FileChooser fileChooser = new FileChooser();
             fileChooser.setTitle("Open Plan File");
             fileChooser.getExtensionFilters().addAll(
             new ExtensionFilter("Plan Files:  *.kaw", "*.kaw", "*.mda", "*.lasagna"),
             new ExtensionFilter("All Files: *.*", "*.*"));
             
             File selectedFile = fileChooser.showOpenDialog(stage);
             if (selectedFile != null)
             {
                    
             }
                     
        });

        menuItemSave.setOnAction((ActionEvent ae)
     -> {
             FileChooser fileChooser = new FileChooser();
             fileChooser.setTitle("Save Plan File");
             fileChooser.getExtensionFilters().addAll(
             new ExtensionFilter("Plan Files:  *.kaw", "*.kaw", "*.mda", "*.lasagna"),
             new ExtensionFilter("All Files: *.*", "*.*"));
             
             File selectedFile = fileChooser.showSaveDialog(stage);
             if (selectedFile != null)
             {

             }
                     
        });
  
  
        menuFile.getItems().setAll(menuItemOpen, menuItemSave);
        
        menuBar.getMenus().setAll(menuFile, menuEdit, menuView);
        menuBar.prefWidthProperty().bind(stage.maxWidthProperty());
       
        
        root.getChildren().add(menuBar);
        
        return menuBar;
    }
Comments
SQE: verified in b104.
30-08-2013

This was fixed in build 96. Tested with HelloMenu in toys/HelloWorld.
16-07-2013

Yeah, makes sense if content is needed outside. The code was from something I found from 2008-2009, so most likely it's very early FX which is probably the reason, yes not everything is perfect(except you Pavel :p). I didn't mean to ask a Q about it, just more a rant like WHYY!!! :) I wish I had more patches in betweeen I went from 89 to 94, so it's a big jump. It worked in 89, breaks in 94.
21-06-2013

The maxWidth property sets the upper limit of window width. By default we have "no limit". I don't think we want to change that. Note that there may be window managers out there allowing for windows bigger than screen size. Even with extended desktop on Windows you can do that. I don't know who invented this line of code and why so I can't answer the other questions. Let me note that I doubt you've found it in some kind of official documentation; not everything found somewhere on the internet is perfect. Still, the dirty regions seem to be broken by the huge value and we should figure out why and perhaps fix it, especially if it recently worked.
21-06-2013

Sorry I was confused, I thought it was "Double" the max value. So if it was 1000 double would be 2000, but I didn't look at it right, and it means the Double Class which is something ridiculously huge in itself right? Shouldn't the stage's default value be the screen size? I don't get why it would be so huge, nor why someone would make an example with code that is no bueno. Should I set it to the stage's preferredWidfthProperty then? By the way I want to add that this worked on previous builds fine, but like you said it has to do with this new D3D pipeline issue.
20-06-2013

By default we don't put any artificial limit on window size, why would that not make sense? Create a window and resize freely unless you introduce the upper limit yourself, I believe that's perfectly correct approach. When you remove the line, the problem stops occurring. When you add -Dprism.dirtyopts=false to the commandline, the problem stops occurring as well (but it has significant negative performance impact).
20-06-2013

I also made another report here https://javafx-jira.kenai.com/browse/RT-31203 which I think has to also do with the D3D pipeline issues.
20-06-2013

Pavel, sorry I got that from a code example online, why is the stae's max width double...? That doesn't make much sense either :P. So the menu is still an issue when removing the line? The system property I was told is supposed to stay in there until they fix the issue, which I'm not sure was ever fixed... Where do you put -Dprism.dirtyopts=false. I see a lot of people talk about command line commands, not to sure if that's where you put it.
20-06-2013

This looks similar to RT-31110
20-06-2013

I'm not sure what the following line wants to accomplish: menuBar.prefWidthProperty().bind(stage.maxWidthProperty()); but the default stage maximum width is Double.MAX_VALUE, so we are trying to render an immensely huge menu and somethings breaks because of that. Removing the line makes it work. I'm attaching a simple test case. Try to drag the red cube, it won't repaint correctly. Interesting thing is that the application contains System.setProperty("prism.dirtyopts", "false"); which doesn't help, but if I run it with -Dprism.dirtyopts=false, it starts to work.
20-06-2013