JavaFX 8 screen rendering freezes when running with hw acceleration enabled - java

One of our JavaFX 8 freezes quite frequently when running on Microsoft Surface 3, every now and then when running on a different tablet running Windows 8 and once in a blue moon when running on a normal desktop.
If we run it with prism.order=sw, it doesn't freeze but the performance on tablets is a little bit too slow to be usable.
When it the screen freezes, one can still click on the screen and all events and the JavaFX thread appear to be working as usual but it just seems that the prism / quantum rendering or whatever it is that it actually converts the scenegraph to pixels crashed.
I've reported a bug in the old JIRA and new JBS and apparently we need to produce a reproducible test case which we don't have time to prepare.
Any ideas as to why this can be happening? Anyone has had this happening as well? Any hints as to how to get to the root of the problem?

Related

JavaFX sporadic rendering issue - disappearing buttons / controls

I have a Java/JavaFX application deployed as a native install for Windows and Mac. The bundled runtime is currently 8.121. You can find the installers and the Java code here: George download
I have been using this application in the classroom weekly (with 20 children) for the last 15 months, and right from the start I have seen the following problem:
From time to time, buttons disappear. That is to say, they are simply rendered as a white rectangle, making them effectively almost invisible. Both the background and label/text disappear.
This mainly happens on mouse-over, but then does not correct itself.
The buttons are still there, and clickable.
It only happens sporadically, but it seems to recur on certain machines more than others. Windows 10 now, but used to the same happened on tiny Windows 7 machines previously.
I am not able to reproduce it myself and have never seen it on a Mac, I think.
It now also happens sometimes with other widgets/controls, and even before any user interaction.
Is there some known issue around this?
Has anyone else described something similar?
Might it have something to do with certain minor operating system adjustments?
Any thoughts or ideas would be much appreciated.
Update (2018-11-06)
Just started testing my application in Java 8 in VirtualBox with Windows 10, and I now get the rendering error myself. Hurra!
Looking into the -Dprism.xxx options, I found this article:
http://werner.yellowcouch.org/log/javafx-8-command-line-options/
Testing with -Dprism.threadcheck=true, I get a lot of
"ERROR: PrismPen / FX threads co-running: DIRTY: false" with stack traces.
Setting -Dprism.dirtopts=falsedoes not solve it for me, though.
But running with -Dprism.order=sw does. But this is not a good solution for an application that may do some demanding rendering (Turtle Geometry).
Will keep digging.
I've been having the same issue, I tried updating to Java 10 but the issue remained. I then edited the properties on java.exe and on the 'Compatibility' tab I set 'Override high DPI scaling behavior' to 'System (enhanced)' and the problem seems to have gone away (or at least it hasn't happened again yet).
I observed the same thing: Visually disappearing (but still functional) buttons and other controls (except labels) especially in areas outside the original size of the window after I have resized it manually)
In my case -Dprism.dirtopts=false reduced the problem but also didn't solve it (and was not really a satisfying solution anyway).
Additionally I observed that some TextField controls also showed rendering glitches (looked like the same text was rendered twice with a little offset). That finally put me on the right track:
It turned out to be just a missing Platform.runLater(...) around some calls to TextField.setText(...) (from another thread) for exactly these TextField controls, which was causing this (even for e.g. a Button which is at a totally different place - also in the widget hierarchy).
I know, this is probably not the answer in all cases, but hopefully it helps at least some others facing the same problem (took me a full day to find out).

Menuitems appear in wrong place on scaled monitor Issue

I'm working on a JavaFX Application and came across an issue. When I run my program on a 150% scaled Windows monitor the Menu items appear in the wrong place.
Can I fix this in code or is this a known issue with JavaFX on scaled monitors?
SOLVED
This behaviour was caused by my secondary monitor which has a different resolution than my laptop screen.
As soon as I disconnected my secondary monitor the problem was gone.

Texture Rendering works on Windows but not Mac OS?

So I am building this game and a map editor / sdk type deal to go with it. On my desktop pc running w7 and my buddies laptop running w10 everything works absolutely fine. I can add objects and move them around (there is also an auto updating properties window to go with each obj) and everything is great.
I am currently traveling so I decided to copy the project over to my macbook. Everything UI wise still works with the exception of things stopped rendering. I know the objects exist within the app because I can click where they would be and the properties update like the would on my desktop the textures just simply are not rendering. I am using a standard orthographic camera and spritebatch setup i've done 1million times and i have all the matricies being forwarded to the batch from the camera as well as your standard color buffer bit glclear call and glclearcolor calls. Why would moving this project to my macbook make textures quit rendering?
Using jdk / jre 1.8_91 on both machines and the same ver of eclipse (mars).
EDIT: ShapeRenderer is not working as well. I also have already tried removing the camera entirely and still no-go. During my rendering loop I am able to print out accurate pixel RBG values and width/height of images that should be rendering which means I am not dealing with some odd nullptr or anything of that nature.
I figured out the issue. By resizing my window the jmenus popup and so do all my renderables. For some reason calling pack() is not working on the frame and I have to resize it to refresh everything at first launch of the app now for this problem =P

Slick2D weird focus/graphical window glitch-like issue?

I'm making a basic game with Slick2D, and have pretty much followed thenewboston's tutorials to the line, up to the episode I have linked. However, when I run the code, the game window starts out of focus, in the background of my other windows. When I manually select it to look at it and bring it into focus, it looks like this:
Sometimes it's just a black window, and sometimes it's this glitchy-looking mess. Also, If you'll notice, the window itself has out-of-focus graphical qualities, even while in focus. None of the buttons at the top left do anything or even graphically respond to a click/hover. However, the window does close upon termination of the program.
I run LWJGL v2.9.3, Slick2D build 237, IntelliJ IDEA CE 2016.3.1 (tested with 2016.2.4 as well), and Mac OS 10.12 Sierra. I've tested this separately with Java 7 and 8, and both produce this result. If anyone can help, I thank you wholeheartedly in advance.
Edit: I've tried running a generic Slick2D demo from the internet (which can be found at gist.github.com/massimomusante/5459957), which should work since I assume it's a tested and very simple demo, but the same kind of thing happens with the out-of-focus black window. So I know it has to do with my setup rather than my game. In terms of native Slick2D/LWJGL stuff, I've tried running the original code with both the packaged Slick2D natives and the LWJGL natives, and the issue still persisted, so natives are likely not the issue either.

Swing app freezes in dual screen windows 7 environment when moving app to top right hand corner of second monitor

I built this Swing app to help my girlfriend get a particular job done faster. On my dual monitor windows system, the app and the Operating System freeze when moving the app to the extreme right hand side of the second monitor. Windows recovers, but the app does not. Has anyone experienced this sort of issue and know how to solve it? Below is the github link to the source code.
I tried to also provide a screenshot of the frozen app and the OS but it is difficult to take one when the OS freezes.
The app works fine on her Mac.
https://github.com/johndeverall/BehaviourCoder

Categories

Resources