Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312894

Summary: IllegalArgumentException with an extensive modifications
Product: z_Archived Reporter: Yves YANG <yves.yang>
Component: VEAssignee: Yves YANG <yves.yang>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
testcase to reproduce the bugs
none
testcase of bug
none
fix of the bug none

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