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

Bug 363897

Summary: got error when setting children for Box
Product: z_Archived Reporter: Xin Wu <cdlwuxin>
Component: EDTAssignee: Huang Ji Yong <hjiyong>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: hjiyong, jqian, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Ldap Green Thread
none
screenshot none

Description Xin Wu CLA 2011-11-16 02:10:59 EST
Build Identifier: 20111115 nightly build

This occurs in a green thread sample 

Reproducible: Always

Steps to Reproduce:
1. Download the attached projects, and import to your workspace
2. Run LdapRuiSample->client->SampleCompany.egl in preview mode
3. You may find the error message as the screen shot attached
Comment 1 Xin Wu CLA 2011-11-16 02:12:31 EST
Created attachment 207084 [details]
Ldap Green Thread
Comment 2 Xin Wu CLA 2011-11-16 02:13:54 EST
Created attachment 207085 [details]
screenshot
Comment 3 Jing Qian CLA 2011-11-21 15:53:38 EST
still same issue on 201111210901's build.

defer this, because box is not the recommended layout, use Gridlayout instead.

Eric, could you try GridLayout to see if there is any issue?
Comment 4 Huang Ji Yong CLA 2011-12-13 02:43:00 EST
This defect is not caused by Box widget. It is a generation problem for array.
There is a work-around to bypass this problem. Go to SampleLib.egl, change the following function from
function getLogin() returns(Widget[])
		syslib.writeStdout("getLogin");
		login Login{};
		return(new Widget[1] {login.commonBox});
	end
	
	function getCustomerData() returns(Widget[])
		syslib.writeStdout("getCustomerData");
		customer CustomerData{};
		return(new Widget[1] {customer.commonBox});
	end
	
	function getEmployeeData() returns(Widget[])
		syslib.writeStdout("getEmployeeData");
		employee EmployeeData{};
		return(new Widget[1] {employee.commonBox});
	end
To:
function getLogin() returns(Widget[])
		syslib.writeStdout("getLogin");
		login Login{};
		return(new Widget[] {login.commonBox});
	end
	
	function getCustomerData() returns(Widget[])
		syslib.writeStdout("getCustomerData");
		customer CustomerData{};
		return(new Widget[] {customer.commonBox});
	end
	
	function getEmployeeData() returns(Widget[])
		syslib.writeStdout("getEmployeeData");
		employee EmployeeData{};
		return(new Widget[] {employee.commonBox});
	end

Notice that, the problem happens when the array length is specified. This problem also happens in JavaGen.
I open another defect 366495 with a simpler test case.
Comment 5 Huang Ji Yong CLA 2012-01-10 02:33:20 EST
Hi Xin,
As discussed in bug 366495, we don't think this is a defect.
I think you should change the test case as described in comment 4
Thanks.
Comment 6 Xin Wu CLA 2012-01-16 21:11:36 EST
Closed this bug as comment #5