Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324138 - [ErrorHandling] Copy action from error dialog causes invalid argument exception
Summary: [ErrorHandling] Copy action from error dialog causes invalid argument exception
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Krzysztof Daniel CLA
QA Contact: Susan McCourt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 16:56 EDT by Marco Maccaferri CLA
Modified: 2011-10-06 08:40 EDT (History)
4 users (show)

See Also:


Attachments
Fix (3.04 KB, patch)
2010-09-08 08:40 EDT, Krzysztof Daniel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Maccaferri CLA 2010-08-31 16:56:18 EDT
Build Identifier: M20100211-1343

The copy action from the error pop-up dialog causes an invalid argument exception when there are no lines selected.

java.lang.IllegalArgumentException: Argument not valid
 at org.eclipse.swt.SWT.error(SWT.java:3865)
 at org.eclipse.swt.SWT.error(SWT.java:3799)
 at org.eclipse.swt.SWT.error(SWT.java:3770)
 at org.eclipse.swt.dnd.DND.error(DND.java:282)
 at org.eclipse.swt.dnd.DND.error(DND.java:228)
 at org.eclipse.swt.dnd.Clipboard.setContents(Clipboard.java:480)
 at org.eclipse.swt.dnd.Clipboard.setContents(Clipboard.java:411)
 at org.eclipse.ui.internal.statushandlers.DefaultDetailsArea.copyToClipboard(DefaultDetailsArea.java:290)
 at org.eclipse.ui.internal.statushandlers.DefaultDetailsArea.access$0(DefaultDetailsArea.java:286)
 at org.eclipse.ui.internal.statushandlers.DefaultDetailsArea$3.widgetSelected(DefaultDetailsArea.java:220)
 at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
 at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
 at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)


Reproducible: Always

Steps to Reproduce:
1. Do something to cause the error pop-up dialog to appear.
2. Open the details area.
3. Right-click on the empty space in the details area, and select copy from the pop-up menu.
Comment 1 Krzysztof Daniel CLA 2010-09-08 07:53:53 EDT
The exception occurrs because the TextTransfer does not tolerate empty string.
Comment 2 Krzysztof Daniel CLA 2010-09-08 08:40:40 EDT
Created attachment 178397 [details]
Fix

Disables Copy action if nothing is selected.
Comment 3 Krzysztof Daniel CLA 2010-09-08 08:47:03 EDT
The impact is minor, as the copy fails when it should be disabled.
Comment 4 Krzysztof Daniel CLA 2010-09-08 08:47:21 EDT
Fix released
Comment 5 Dani Megert CLA 2011-10-06 08:40:10 EDT
This did not make it into 4.x. Cherry-picked now.