简体   繁体   English

Java Applet白色屏幕

[英]Java applet white screen

I'm trying to get to the bottom of a problem with our Java applet based program. 我试图让我们的基于Java applet的程序陷入困境。 It quite regularly seizes up with an unresponsive GUI (or a white screen). 它经常会因无响应的GUI(或白屏)而停滞不前。 This of course only happens when deployed at a customer site :-(. They are running a version of the Sun JVM in 1.5 series (not sure the exact release). 当然,只有在客户站点上部署时才会发生这种情况:-(。他们正在运行1.5系列的Sun JVM版本(不确定确切的发行版)。

We have a theory that it's to do with the applet running out of heap space - does that sound plausible? 我们有一个理论认为这与applet耗尽堆空间有关-听起来合理吗? The other thing that I have set up on my machine is disabling direct draw, but that was mainly to avoid weird artefacts on other applications. 我在计算机上设置的另一件事是禁用直接绘图,但这主要是为了避免在其他应用程序上出现怪异的伪像。

They are seeing the problem on Citrix and on regular PCs, but obviously there is a limit to what the users on Citrix can do. 他们在Citrix和常规PC上都看到了问题,但是显然Citrix用户可以做的事情受到限制。

Any suggestions? 有什么建议么?

Running out of heap space should cause an OutOfMemoryError to be thrown. 堆空间用完将导致OutOfMemoryError This case sounds like a typical deadlock. 这种情况听起来像是典型的僵局。 To find where that is you want a stack dump of all the threads. 要找到那是哪里,您需要所有线程的堆栈转储。 IIRC< you can do it through the console, or from IIRC 1.6 the JDK includes jps and jstack . IIRC <您可以通过控制台进行操作,也可以从IIRC 1.6进行操作,JDK包括jpsjstack

First of all ensure the customer uses the latest release of the JVM they are using, and make them enable the Java console inside their browser (this requires some research from you). 首先,确保客户使用他们正在使用的最新版本的JVM,并使他们在浏览器中启用Java控制台(这需要您做一些研究)。

Then when it happens again, tell them to look at the console window and cut-paste the contents in a mail to you. 然后,如果再次发生,请告诉他们查看控制台窗口,然后将内容剪切并粘贴到发给您的邮件中。

Just to add to this answer (to build the knowledge base as I'm currently looking into this). 只是添加到此答案中即可(建立我目前正在研究的知识库)。

There's (at least) 2 distinct white screens related to applets. 至少有2个与小程序相关的白屏。

  1. Deadlock (as mentioned by Tom) - area will not refresh when you drag a window in front of it, so you get the strange tails left effect. 死锁(汤姆提到)-当您在窗口前拖动窗口时,该区域不会刷新,因此您会得到奇怪的尾巴效果。

  2. VM crash - area will become white, Java VM closes (search for hs_err_pid*.log, location dependent on browser) VM崩溃-区域将变成白色,Java VM关闭(搜索hs_err_pid * .log,位置取决于浏览器)

In order to solve the problem, you must first be able to reproduce the problem. 为了解决问题,您必须首先能够重现该问题。 You will need an identical system in order to troubleshoot this, making one change at a time while keeping everything else equal to determine the cause(s). 您将需要一个相同的系统来解决此问题,一次更改一次,同时保持其他所有条件不变以确定原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM