开发者

An applet gets Windows 7 to freeze completely

I've got an applet which does something which gets Windows 7 to freeze completely, the mouse pointer no longer responds, ctrl-alt-del no longer works etc.

When I open the task manager, it doesn't show any significant CPU load or excessive usage of memory.

The freeze sometimes happens when debugging on Eclipse as well, but not always.

I'm not quite sure where I should set breakpoints yet since it's a pretty big GUI application.

Could this be a bug in the JVM? Isn't it supposed to be impossible for an applet to do something like this?

Edit: To answer my own question, I found the bug in Eclipse, and it seems that the call to Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null) gets the whole system to freeze, which is pretty surprising since the Excel file is only 1 MB. Maybe the 开发者_Python百科clipboard isn't really designed for situations like this.


Use jStack to generate a Thread Dump. That way you will know what the code is doing. To use it just:

C:\your_java_bin_folder> jstack -l <process-id>

You can get the process id from the Task Manager. jStack is part of the jdk (as far as I know since 1.5).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜