Summary: | Eclipse hangs while building as a part of auto build for a ant script | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | hitendrab <Hitendra_Behera> |
Component: | Ant | Assignee: | Platform-Ant-Inbox <platform-ant-inbox> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | Keywords: | ui |
Version: | 2.0.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows NT | ||
Whiteboard: |
Description
hitendrab
2002-11-13 01:29:41 EST
After blocking the EventLoopProgressMonitor ( monitor.cancel(true), and monitor.done()), and created new DialogProgressMonitor for building, and it goes fine. We had problems with hanging in 2.0.1...is it possible for you to try 2.0.2. A fix was introduced and it would be great if you could see if this addresses your problem. See bug 25191. marking as "new" until we have verification this is still a problem. We tried with Eclipse 2.0.2, and it is working fine if I commnet //monitor.isCanceled(); (blocking cancel functionality). If you will use this, it throws error, SWT.thread error... We are looking for this solution where user can cancel operation anytime. This fix was not made till now. Is there any work around to achieve this? So you are now getting an SWT error? Can you provide the stack trace? Please find the stacktrace... org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:2119) at org.eclipse.swt.SWT.error(SWT.java:2051) at org.eclipse.swt.widgets.Display.error(Display.java:503) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:370) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1285) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop (EventLoopProgressMonitor.java:89) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled (EventLoopProgressMonitor.java:68) at org.eclipse.core.runtime.ProgressMonitorWrapper.isCanceled (ProgressMonitorWrapper.java:87) at org.eclipse.core.runtime.ProgressMonitorWrapper.isCanceled (ProgressMonitorWrapper.java:87) at org.eclipse.core.runtime.ProgressMonitorWrapper.isCanceled (ProgressMonitorWrapper.java:87) at test.BuildLogger.checkCanceled(BuildLogger.java:354) at test.ant.BuildLogger.messageLogged(BuildLogger.java:217) at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:982) at org.apache.tools.ant.Project.fireMessageLogged(Project.java:998) at org.apache.tools.ant.Project.log(Project.java:250) at org.apache.tools.ant.Task.log(Task.java:207) at org.apache.tools.ant.taskdefs.LogOutputStream.processLine (LogOutputStream.java:132) at org.apache.tools.ant.taskdefs.LogOutputStream.processLine (LogOutputStream.java:123) at org.apache.tools.ant.taskdefs.LogOutputStream.processBuffer (LogOutputStream.java:113) at org.apache.tools.ant.taskdefs.LogOutputStream.write (LogOutputStream.java:103) at java.io.OutputStream.write(OutputStream.java:102) at org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:100) at java.lang.Thread.run(Thread.java:484) The SWT error is an error in your code. SWT enforces that all access to its widgets/state be only from the designated UI thread. The coding style to workaround this limitation is to make use of Display.asyncExec(Runnable) and Display.syncExec(Runnable). See the comments on these methods for more details (or some of the many SWT snippet examples) After doing above change it works fine without any problem. Fixed in 2.0.2. No plans for any additional work. |