1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 247010 - RejectedExecutionException when launch is removed

This commit is contained in:
Anton Leherbauer 2008-09-11 13:14:40 +00:00
parent 41c8b18397
commit a980785a88
3 changed files with 15 additions and 7 deletions

View file

@ -60,11 +60,13 @@ public class AbstractDebugVMAdapter extends AbstractDMVMAdapter
@Override
public void dispose() {
fController.getExecutor().execute(new DsfRunnable() {
public void run() {
fController.removeSteppingControlParticipant(AbstractDebugVMAdapter.this);
}
});
if (!fController.getExecutor().isShutdown()) {
fController.getExecutor().execute(new DsfRunnable() {
public void run() {
fController.removeSteppingControlParticipant(AbstractDebugVMAdapter.this);
}
});
}
super.dispose();
}
}

View file

@ -187,6 +187,10 @@ public class PDAAdapterFactory implements IAdapterFactory, ILaunchesListener2
PDALaunch launch = (PDALaunch)adaptableObject;
// check for valid session
DsfSession session = launch.getSession();
if (session == null || !session.isActive()) return null;
// Find the correct set of adapters based on the launch. If not found
// it means that we have a new launch, and we have to create a
// new set of adapters.

View file

@ -208,11 +208,13 @@ public class GdbAdapterFactory
GdbLaunch launch = (GdbLaunch)adaptableObject;
// check for valid session
DsfSession session = launch.getSession();
if (session == null || !session.isActive()) return null;
// Find the correct set of adapters based on the launch session-ID. If not found
// it means that we have a new launch and new session, and we have to create a
// new set of adapters.
DsfSession session = launch.getSession();
if (session == null) return null;
SessionAdapterSet adapterSet;
synchronized(fgLaunchAdapterSets) {