Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-11-03 04:10:28 -0500
committerUwe Stieber2013-11-03 04:11:59 -0500
commit4a374b5f8b0542f0c9fb6cd1e7fefa15e3f663ed (patch)
treec14d1254c997836dad197b7a0d2b1620eedd37b7
parent4ab5ab8a84eb2b71aaee6ead363aa9529ef8cecd (diff)
downloadorg.eclipse.tcf-4a374b5f8b0542f0c9fb6cd1e7fefa15e3f663ed.tar.gz
org.eclipse.tcf-4a374b5f8b0542f0c9fb6cd1e7fefa15e3f663ed.tar.xz
org.eclipse.tcf-4a374b5f8b0542f0c9fb6cd1e7fefa15e3f663ed.zip
Target Explorer: NPE on attaching debugger. DebugUITools.launch not invoked from within UI thread.
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
index 809b23f57..8e3df6862 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
@@ -38,6 +38,7 @@ import org.eclipse.tcf.te.runtime.services.AbstractService;
import org.eclipse.tcf.te.runtime.services.interfaces.IDebugService;
import org.eclipse.tcf.te.runtime.utils.StatusHelper;
import org.eclipse.tcf.te.tcf.launch.core.interfaces.ILaunchTypes;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
/**
* Debug service implementations for TCF contexts.
@@ -139,7 +140,13 @@ public class DebugService extends AbstractService implements IDebugService {
}
});
- DebugUITools.launch(finConfig, ILaunchManager.DEBUG_MODE);
+ // DebugUITools.launch(...) must be called from within the UI thread.
+ DisplayUtil.safeAsyncExec(new Runnable() {
+ @Override
+ public void run() {
+ DebugUITools.launch(finConfig, ILaunchManager.DEBUG_MODE);
+ }
+ });
} else {
callback.done(this, Status.OK_STATUS);
}

Back to the top