Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365825 - [flex] Copying the stack trace in Debug view never completes.
Summary: [flex] Copying the stack trace in Debug view never completes.
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P1 critical (vote)
Target Milestone: 4.2 M4   Edit
Assignee: Pawel Piech CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 23:47 EST by Pawel Piech CLA
Modified: 2011-12-08 13:15 EST (History)
1 user (show)

See Also:
Michael_Rennie: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Piech CLA 2011-12-06 23:47:06 EST
Version: 4.2.0
Build id: I20111206-1015

1) Start debugging a java program.
2) Run to a breakpoint
3) Right click on a stack frame and select "Copy Stack".

The cursor turns into a waiting cursor and never turns back into an arrow. Clipboard is empty.  Copying in other views works, but in others (e.g. Registers), it doesn't.
Comment 1 Pawel Piech CLA 2011-12-06 23:48:48 EST
I also got the following NPE when trying to perform a copy in the Expressions view:

java.lang.NullPointerException
	at org.eclipse.debug.internal.ui.viewers.update.DefaultWatchExpressionModelProxy$1.runInUIThread(DefaultWatchExpressionModelProxy.java:60)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.debug.internal.ui.viewers.model.TimeTriggeredProgressMonitorDialog.access$6(TimeTriggeredProgressMonitorDialog.java:1)
	at org.eclipse.debug.internal.ui.viewers.model.TimeTriggeredProgressMonitorDialog$2.run(TimeTriggeredProgressMonitorDialog.java:203)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.debug.internal.ui.viewers.model.TimeTriggeredProgressMonitorDialog.run(TimeTriggeredProgressMonitorDialog.java:216)
	at org.eclipse.debug.internal.ui.viewers.model.VirtualCopyToClipboardActionDelegate.run(VirtualCopyToClipboardActionDelegate.java:306)
	at org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate.runWithEvent(AbstractDebugActionDelegate.java:321)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
...
Comment 2 Michael Rennie CLA 2011-12-07 09:42:52 EST
(In reply to comment #1)
> I also got the following NPE when trying to perform a copy in the Expressions
> view:
> 
> java.lang.NullPointerException
>     at

Another way to reproduce the NPE is to simply click the 'Add Expression' entry in the view, enter a value - like 'a' - and hit enter.
Comment 3 Michael Rennie CLA 2011-12-07 10:07:40 EST
(In reply to comment #2)
> (In reply to comment #1)
> > I also got the following NPE when trying to perform a copy in the Expressions
> > view:
> > 
> > java.lang.NullPointerException
> >     at
> 
> Another way to reproduce the NPE is to simply click the 'Add Expression' entry
> in the view, enter a value - like 'a' - and hit enter.

Weird, after restarting Eclipse and trying to debug the NPE, I can no longer reproduce it by adding new expressions...
Comment 4 Michael Rennie CLA 2011-12-07 10:31:57 EST
On Windows 7, once the Copy Stack action is invoked, even closing Eclipse does not kill the underlying Java process, I have to use the task manager - so that I can restart using the same workspace.
Comment 5 Pawel Piech CLA 2011-12-07 13:45:07 EST
I committed the fix: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=0c06515f0b531fad6e5f05e4f2806468f1bb7eb6.  It turned out to be two separate bugs which caused the model to never complete filling the label updates for the copy operation.  

This fix should take care of the immediate issue, but I'll file a separate bug to make the copy operation more tolerant of bad model implementation, so that the user has at least the option to cancel a copy and not leave the whole IDE in an inconsistent state.
Comment 6 Michael Rennie CLA 2011-12-08 10:31:31 EST
Looks good.
Comment 7 Pawel Piech CLA 2011-12-08 13:15:20 EST
Verified in Build id: I20111208-0200