From 329d0ae6d171db05ed438deb77d841c765463f92 Mon Sep 17 00:00:00 2001 From: nik Date: Fri, 12 Nov 2010 15:24:40 +0300 Subject: [PATCH 1/2] EA-22120 - assert: RunContentDescriptor. --- .../src/com/intellij/execution/ui/RunContentDescriptor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/lang-api/src/com/intellij/execution/ui/RunContentDescriptor.java b/platform/lang-api/src/com/intellij/execution/ui/RunContentDescriptor.java index 645f35a26f69..f3e839b6ed01 100644 --- a/platform/lang-api/src/com/intellij/execution/ui/RunContentDescriptor.java +++ b/platform/lang-api/src/com/intellij/execution/ui/RunContentDescriptor.java @@ -18,7 +18,6 @@ package com.intellij.execution.ui; import com.intellij.execution.process.ProcessHandler; import com.intellij.ide.DataManager; import com.intellij.openapi.actionSystem.DataProvider; -import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Disposer; import com.intellij.ui.content.Content; @@ -44,7 +43,6 @@ public class RunContentDescriptor { public RunContentDescriptor(final ExecutionConsole executionConsole, final ProcessHandler processHandler, final JComponent component, final String displayName, final Icon icon) { - LOG.assertTrue(executionConsole != null || ApplicationManager.getApplication().isUnitTestMode()); myExecutionConsole = executionConsole; myProcessHandler = processHandler; myComponent = component; @@ -71,7 +69,9 @@ public class RunContentDescriptor { } public void dispose() { - Disposer.dispose(myExecutionConsole); + if (myExecutionConsole != null) { + Disposer.dispose(myExecutionConsole); + } } @Nullable From 9cd0bf4e0767ab28ee39a356a32d8f916564df3f Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Fri, 12 Nov 2010 15:36:18 +0300 Subject: [PATCH 2/2] disable assertion --- .../debugger/engine/SuspendManagerImpl.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/SuspendManagerImpl.java b/java/debugger/impl/src/com/intellij/debugger/engine/SuspendManagerImpl.java index 8e561f1fe352..07bed88ea199 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/SuspendManagerImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/SuspendManagerImpl.java @@ -19,7 +19,6 @@ import com.intellij.debugger.jdi.ThreadReferenceProxyImpl; import com.intellij.openapi.diagnostic.Logger; import com.sun.jdi.InternalException; import com.sun.jdi.ObjectCollectedException; -import com.sun.jdi.ThreadReference; import com.sun.jdi.event.EventSet; import com.sun.jdi.request.EventRequest; @@ -116,19 +115,19 @@ public class SuspendManagerImpl implements SuspendManager { LOG.debug("Start resuming eventSet " + set.toString() + " suspendPolicy = " + set.suspendPolicy() + ",size = " + set.size()); } myDebugProcess.logThreads(); - final ThreadReferenceProxyImpl thread = getThread(); - - if (thread != null) { // check that thread is suspended at the moment - try { - if (!thread.isSuspended()) { - final int status = thread.status(); - if ((status != ThreadReference.THREAD_STATUS_ZOMBIE) && (status != ThreadReference.THREAD_STATUS_NOT_STARTED) && (status != ThreadReference.THREAD_STATUS_UNKNOWN)) { - LOG.error("Context thread must be suspended"); - } - } - } - catch (ObjectCollectedException ignored) {} - } + //final ThreadReferenceProxyImpl thread = getThread(); + // + //if (thread != null) { // check that thread is suspended at the moment + // try { + // if (!thread.isSuspended()) { + // final int status = thread.status(); + // if ((status != ThreadReference.THREAD_STATUS_ZOMBIE) && (status != ThreadReference.THREAD_STATUS_NOT_STARTED) && (status != ThreadReference.THREAD_STATUS_UNKNOWN)) { + // LOG.error("Context thread must be suspended"); + // } + // } + // } + // catch (ObjectCollectedException ignored) {} + //} int attempts = 5; while (--attempts > 0) {