-1

I am writing a JAVAFX program and there are some random blockers which happen sometimes. But I've totally no idea where it comes and how to solve this issue.

Like the picture below, there should be 2 buttons but 2 blank areas block the button(even mouse events cannot be passed) and I cannot see anything. Some blank areas blocked GUI

Since it is randomly generated, I've no idea how to debug to find them..Can someone give me some suggetions?

Really thanks a lot!!!

Edit: Does someone know why all animations in JavaFx program become lag after specifying -Dprism.order=sw?

Community
  • 1
  • 1
ZanderXu
  • 1
  • 3
  • Please provide an [MCVE](http://stackoverflow.com/help/mcve) (the minimal code example which reproduces the problem). Also - does this happen on multiple machines? On multiple operating systems? This could be an issue with some software or malware on your machine interfering with JavaFX... – Itai Mar 20 '17 at 07:35
  • @sillyfly Thanks for your prompt reply! As it happens randomly, I've no idea which part of code cause this problem(and the project is quite large I cannot use part of code to reproduce.) This problem is more like a runtime issue, sometime it happens, sometimes it is not. I am now looking at Prism render thread, hope it can help... – ZanderXu Mar 20 '17 at 08:32
  • @sillyfly It happens on multiple machines (I am not sure if it happens on multiple OS because my friends and I only use Windows) – ZanderXu Mar 20 '17 at 08:37
  • Does running with `-Dprism.order=sw` solve the issue? See also http://stackoverflow.com/questions/28020338/javafx-whole-gui-broken-on-some-machines – Itai Mar 20 '17 at 08:46
  • Hi @sillyfly, thanks a lot and I really appreciate your help!!! I've added this command, and will keep testing (Since this issue cannot be reproduced by certain combination of operations on GUI, the only thing I can do is keep running application and see if it happens again). I will tell you if this problem disappear in the next few days. Thanks again!! – ZanderXu Mar 20 '17 at 09:30
  • Hello @sillyfly, the problem still occurs sometimes. :( – ZanderXu Mar 23 '17 at 07:46
  • `prism.order=sw` means forcing software renderer, so it makes sense some things will work slower, but it rules out HW or driver issues in most cases. I don't have any more ideas as to what to try - it's probably some component or code you are using, but without seeing more of the code it's almost impossible to tell. If you can recreate this with a minimal example (try removing libraries/parts of code until it no longer occurs?) it may help pinpointing the problem. – Itai Mar 23 '17 at 08:10
  • @sillyfly really thanks! I will upload my code the time I can reproduce it – ZanderXu Mar 24 '17 at 06:07

1 Answers1

0

This rendering issue maybe cause by incorrectly using multi-threads. Things like too many events from remote server come in, some of handlers are processing GUI tasks outside GUI thread.

ZanderXu
  • 1
  • 3