Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Applied patch - fix disposeExec called from wrong thread for M7


I was getting an ErrorLog when starting the CDT Debugger in M7 after installing (I did not get it when running under the runtime workbench, weird...). The exception was thrown by the disposeExec below since it wasn't getting called from the right thread. The quick fix is to wrap in an asyncExec.

Index: src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java,v
retrieving revision 1.1
diff -u -r1.1 CDebugImageDescriptorRegistry.java
--- src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java        30 Aug 2002 23:30:27 -0000        1.1
+++ src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java        13 Feb 2004 22:06:06 -0000
@@ -85,12 +85,14 @@
 
         private void hookDisplay()
         {
-                fDisplay.disposeExec( new Runnable()
-                                                                        {
-                                                                                public void run()
-                                                                                {
-                                                                                        dispose();
-                                                                                }
-                                                                        } );
+                fDisplay.asyncExec(new Runnable() {
+                        public void run() {
+                                fDisplay.disposeExec( new Runnable() {
+                                        public void run()        {
+                                                dispose();
+                                        }
+                                } );
+                        }
+                } );
         }
 }

Doug Schaefer, Senior Software Developer
IBM Rational Software, Ottawa, Ontario, Canada

Back to the top