开发者

Java app sometimes lock up in Netbeans : D3D Screen Updater, Object.wait, how to fix?

开发者 https://www.devze.com 2023-02-04 18:30 出处:网络
My Java Swing application will lock up 30% of the ti开发者_如何学Pythonme when I run it from Netbeans, so I used the debug function to \"Debug File\", I suspended all other threads, and found the ones

My Java Swing application will lock up 30% of the ti开发者_如何学Pythonme when I run it from Netbeans, so I used the debug function to "Debug File", I suspended all other threads, and found the ones that most likely caused the problem, they are :

<1> AWT-EventQueue-0
<2> D3d Screen Updater [ More likely ]

But when I clicked on it, it said : "Object.wait / Hidden Source Calls / D3dScreenUpdateManager.run.419 / Thread.run:619

It didn't point to where in my app, the problem was, what can I do to fix it ? I don't know where the problem is in my app.

Frank


Freezing of a GUI is usually caused by blocking the Event Dispatch Thread. Long running tasks should execute on a separate Thread.

Read the section from the Swing tutorial on Concurrency for more inforamtion and for solutions.

0

精彩评论

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