Revision: 18037
http://sourceforge.net/p/gate/code/18037
Author: markagreenwood
Date: 2014-05-29 13:02:48 +0000 (Thu, 29 May 2014)
Log Message:
-----------
fixed a bug in the EDT hang monitor but disabled it as it seems to cause some
problems
Modified Paths:
--------------
gate/trunk/plugins/Developer_Tools/src/gate/creole/EDTMonitor.java
gate/trunk/plugins/Developer_Tools/src/org/jdesktop/swinghelper/debug/EventDispatchThreadHangMonitor.java
Modified: gate/trunk/plugins/Developer_Tools/src/gate/creole/EDTMonitor.java
===================================================================
--- gate/trunk/plugins/Developer_Tools/src/gate/creole/EDTMonitor.java
2014-05-29 01:22:22 UTC (rev 18036)
+++ gate/trunk/plugins/Developer_Tools/src/gate/creole/EDTMonitor.java
2014-05-29 13:02:48 UTC (rev 18037)
@@ -20,7 +20,6 @@
import javax.swing.RepaintManager;
import org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager;
-import org.jdesktop.swinghelper.debug.EventDispatchThreadHangMonitor;
@CreoleResource(tool = true, isPrivate = true, autoinstances = @AutoInstance,
name = "EDT Monitor", helpURL =
"http://gate.ac.uk/userguide/sec:misc-creole:dev-tools", comment = "Warns
whenever an AWT component is updated from anywhere other than the event
dispatch thread")
public class EDTMonitor extends AbstractResource {
@@ -29,7 +28,11 @@
@Override
public Resource init() throws ResourceInstantiationException {
RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager());
- EventDispatchThreadHangMonitor.initMonitoring();
+
+ // These actually seems to cause things to hang sometimes so don't use it
+ // until we have figured out why
+ // EventDispatchThreadHangMonitor.initMonitoring();
+
return this;
}
}
Modified:
gate/trunk/plugins/Developer_Tools/src/org/jdesktop/swinghelper/debug/EventDispatchThreadHangMonitor.java
===================================================================
---
gate/trunk/plugins/Developer_Tools/src/org/jdesktop/swinghelper/debug/EventDispatchThreadHangMonitor.java
2014-05-29 01:22:22 UTC (rev 18036)
+++
gate/trunk/plugins/Developer_Tools/src/org/jdesktop/swinghelper/debug/EventDispatchThreadHangMonitor.java
2014-05-29 13:02:48 UTC (rev 18037)
@@ -216,7 +216,14 @@
* Sets up hang detection for the event dispatch thread.
*/
public static void initMonitoring() {
- Toolkit.getDefaultToolkit().getSystemEventQueue().push(INSTANCE);
+ //do the switch on the EDT as a fix for this bug
+ //http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7097333
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ Toolkit.getDefaultToolkit().getSystemEventQueue().push(INSTANCE);
+ }
+ });
}
/**
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs