Applet completely freezes Windows 7

I have an applet that does something that causes Windows 7 to freeze completely, the mouse cursor no longer responds, ctrl-alt-del no longer works, etc.

When I open the task manager, it does not show significant CPU utilization or excessive memory usage.

Freezing sometimes occurs when debugging on Eclipse, but not always.

I'm not quite sure where I should set breakpoints, as this is a pretty big graphical application.

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

Edit: To answer my own question, I found an error in Eclipse, and it seems like calling Toolkit.getDefaultToolkit (). getSystemClipboard (). getContents (null) gets the whole system to freeze, which is pretty surprising since the Excel file is only 1 MB. Perhaps the clipboard is not designed for such situations.

+5
source share
1 answer

Use jStackto create a stream dump. This way you will know what the code is doing. Using it is simple:

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

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

+1
source

All Articles