Java小程序白屏
我试图找出我们基于 Java applet 的程序的问题的根源。 它经常会出现 GUI 无响应(或白屏)的情况。 当然,只有在部署在客户站点时才会发生这种情况:-(。他们运行的是 Sun JVM 1.5 系列版本(不确定确切的版本)。
我们有一个理论认为,这与小程序耗尽堆有关space - 这听起来合理吗?我在我的机器上设置的另一件事是禁用直接绘制,但这主要是为了避免其他应用程序上出现奇怪的问题
,但显然存在这个问题。 Citrix 上的用户可以执行的操作有限制吗?
有什么建议吗?
I'm trying to get to the bottom of a problem with our Java applet based program. It quite regularly seizes up with an unresponsive GUI (or a white screen). 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).
We have a theory that it's to do with the applet running out of heap space - does that sound plausible? 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.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
堆空间耗尽会导致抛出
OutOfMemoryError
。 这个案例听起来像是一个典型的僵局。 要找到它在哪里,您需要所有线程的堆栈转储。 IIRC< 您可以通过控制台来完成此操作,或者从 IIRC 1.6 开始,JDK 包括jps
和jstack
。Running out of heap space should cause an
OutOfMemoryError
to be thrown. 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 includesjps
andjstack
.首先,确保客户使用他们正在使用的最新版本的 JVM,并让他们在浏览器中启用 Java 控制台(这需要您进行一些研究)。
然后,当这种情况再次发生时,告诉他们查看控制台窗口并将邮件中的内容剪切粘贴给您。
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).
Then when it happens again, tell them to look at the console window and cut-paste the contents in a mail to you.
为了解决问题,首先必须能够重现问题。 您将需要一个相同的系统来解决此问题,一次进行一项更改,同时保持其他所有内容相同以确定原因。
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).
只是为了添加这个答案(构建我目前正在研究的知识库)。
(至少)有 2 个与小程序相关的不同的白色屏幕。
死锁(如 Tom 提到的)- 当您将窗口拖动到区域前面时,区域不会刷新,因此您会得到奇怪的尾巴左移效果。
VM 崩溃 - 区域将变为白色,Java VM 关闭(搜索 hs_err_pid*.log,位置取决于浏览器)
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.
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.
VM crash - area will become white, Java VM closes (search for hs_err_pid*.log, location dependent on browser)