Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312894 - IllegalArgumentException with an extensive modifications
Summary: IllegalArgumentException with an extensive modifications
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: VE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Yves YANG CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 07:46 EDT by Yves YANG CLA
Modified: 2013-01-13 17:08 EST (History)
0 users

See Also:


Attachments
testcase to reproduce the bugs (17.44 KB, application/x-zip-compressed)
2010-05-14 07:46 EDT, Yves YANG CLA
no flags Details
testcase of bug (35.47 KB, application/x-zip-compressed)
2010-05-14 10:20 EDT, Yves YANG CLA
no flags Details
fix of the bug (7.07 KB, patch)
2010-05-14 10:30 EDT, Yves YANG CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yves YANG CLA 2010-05-14 07:46:24 EDT
Created attachment 168527 [details]
testcase to reproduce the bugs

When we modify some UI element by API, the renderer raises an exception from time to time.

java.lang.IllegalArgumentException: Argument cannot be null
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.graphics.ImageData.<init>(ImageData.java:419)
at org.eclipse.swt.graphics.ImageData.<init>(ImageData.java:259)
at org.eclipse.ve.internal.swt.ImageDataCollector.createImageData(ImageDataCollector.java:297)
at org.eclipse.ve.internal.swt.ImageDataCollector.calledBackStream(ImageDataCollector.java:191)
at org.eclipse.jem.internal.proxy.remote.REMCallbackThread.run(REMCallbackThread.java:276)

Procedure to reproduce:
1. Load the testcase in workspace
2. Start a runtime workbench
3. Call the context menu in the VE to change Font, Background etc
Comment 1 Yves YANG CLA 2010-05-14 10:20:12 EDT
Created attachment 168542 [details]
testcase of bug

Remove the dependency on others bundle and make it work directly with standard VE
Comment 2 Yves YANG CLA 2010-05-14 10:27:42 EDT
After launch and open the Visual Editor, a "Bugs" menu is added on a "*.java" file with four actions: 
-Change All: Change all foreground, background and font of widgets.
-Backgrounds: Change background color of widgets to a radom value.
-Foregrounds: Change foreground color of widgets to a radom value.
-Fonts: Change font of widgets to "Times New Roman" with a radom height.

The testing should be done with an openning VE editor, which contains at least 7 widgets.
Comment 3 Yves YANG CLA 2010-05-14 10:30:29 EDT
Created attachment 168543 [details]
fix of the bug

The stack trace indicates the image structure is wrong. It is probably due to   
the multiple threading during the imgae capture. 

It seems this patch fixes this problem.
Comment 4 Yves YANG CLA 2013-01-13 17:08:11 EST
The project gets archived