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

Bug 365601: GUI can become unresponsive when starting a debug launch.

Solution for the maintenance branch only.

Change-Id: Ice9f9e0b4700bd40b7af133def9d8396b8e20011
This commit is contained in:
Marc Khouzam 2012-07-20 08:49:56 -04:00
parent 0ee284043d
commit 43fc027a9c
3 changed files with 13 additions and 4 deletions

View file

@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true
Bundle-Version: 2.3.0.qualifier
Bundle-Version: 2.3.1.qualifier
Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,

View file

@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<version>2.3.0-SNAPSHOT</version>
<version>2.3.1-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.dsf.gdb.ui</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

View file

@ -18,6 +18,8 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.eclipse.cdt.dsf.concurrent.CountingRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
@ -102,12 +104,19 @@ public class GdbConnectCommand implements IConnect {
};
try {
fExecutor.execute(canConnectQuery);
return canConnectQuery.get();
return canConnectQuery.get(50, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
} catch (ExecutionException e) {
} catch (RejectedExecutionException e) {
// Can be thrown if the session is shutdown
}
} catch (TimeoutException e) {
// Bug 365601
// Don't wait forever so as to not lock the UI and
// potentially create a deadlock.
// If we timeout, we just return false and disable
// the connect command. The next call to this method
// will likely succeed and fix this.
}
return false;
}