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

Bug 354908

Summary: StackOverflowError when adding composite to tabitem
Product: z_Archived Reporter: Joerg Reichert <joerg83reichert>
Component: WindowBuilderAssignee: Project Inbox <wb.xwt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: clayberg
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
form before adding the composite to the tab item
none
Screenshot of the workspace none

Description Joerg Reichert CLA 2011-08-17 03:15:14 EDT
Build Identifier: Eclipse 3.7 I20110613-1736, WindowBuilder 1.0.0.r37x201106081531

When adding a composite element as a child of a tabitem a StackOverflow is caused. This is the code produced in the XML-File:

		<TabItem text="A">
			<TabItem.control>
				<Composite/>
			</TabItem.control>
		</TabItem>

I append the hole forms file in the state before adding the composite.


!ENTRY org.eclipse.wb.core 4 4 2011-08-17 08:58:05.895
!MESSAGE Designer [1.0.0.r37x201106081531.201108170858]: java.lang.StackOverflowError
!STACK 0
java.lang.StackOverflowError
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.initialize(AbstractMetaclass.java:614)
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.assertInitialize(AbstractMetaclass.java:610)
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:360)
	at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63)
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:361)
	at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63)
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:361)
	at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63)
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:361)
	at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63)

Reproducible: Always

Steps to Reproduce:
1. Create XWT Form
2. Create TabFolder inside form
3. Create TabItem inside tab folder
4. Create Composite inside tab item
Comment 1 Joerg Reichert CLA 2011-08-17 03:16:02 EDT
Created attachment 201619 [details]
form before adding the composite to the tab item
Comment 2 Eric Clayberg CLA 2011-08-17 16:37:18 EDT
I was not able to reproduce this. Your example worked perfectly on my end when I added the Composite. I also tried it from scratch, and it worked just fine. The stack trace you appended makes it look like an XWT bug rather than a WB issue (maybe there is an issue with the specific version of XWT that you are using).

I also noticed that you are using an older version of WB from 20110608. I would always recommend updating to the latest build and trying that first.
Comment 3 Joerg Reichert CLA 2011-08-18 06:05:31 EDT
(In reply to comment #2)
> I was not able to reproduce this. Your example worked perfectly on my end when
> I added the Composite. I also tried it from scratch, and it worked just fine.
> The stack trace you appended makes it look like an XWT bug rather than a WB
> issue (maybe there is an issue with the specific version of XWT that you are
> using).
> 
> I also noticed that you are using an older version of WB from 20110608. I would
> always recommend updating to the latest build and trying that first.


The Indigo Release Update Site (http://download.eclipse.org/releases/indigo) currently only offers the June version. But I found out at http://code.google.com/intl/de-DE/javadevtools/download-wbpro.html that there is a July version as well as a BETA version. But both leading to the stack overflow, too. It seems to be a XWT bug. 

By creating the XWT Forms Composite with the wizard there are e4 xwt libraries copied into the project (see appended screenshot), currently e.g. org.eclipse.e4.xwt.forms_0.9.1.SNAPSHOT.jar. 

As you cannot reproduce the bug, I am curious which XWT version you use. Should the windows builder be better bound to a certain XWT version (not a SNAPSHOT one)?

Anyway I will post a bug report to the e4 team and leave that bug report closed for now.


The stacktraces:

!ENTRY org.eclipse.wb.core 4 4 2011-08-18 11:16:04.045
!MESSAGE Designer [1.0.0.r37x201106081531.201108181116]: java.lang.StackOverflowError
!STACK 0
java.lang.StackOverflowError
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.assertInitialize(AbstractMetaclass.java:610)
        at
org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:360)
	at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63)
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:361)
	at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63)

and 

!ENTRY org.eclipse.wb.core 4 4 2011-08-18 11:43:46.362
!MESSAGE Designer [1.1.0.r37x201108111706.201108181142]: java.lang.StackOverflowError
!STACK 0
java.lang.StackOverflowError
	at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63)
	at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:361)
	at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63)
Comment 4 Joerg Reichert CLA 2011-08-18 06:06:26 EDT
Created attachment 201704 [details]
Screenshot of the workspace

to see the copied XWT libraries
Comment 5 Joerg Reichert CLA 2011-08-18 06:22:08 EDT
created bug report in e4 XWT section: https://bugs.eclipse.org/bugs/show_bug.cgi?id=355050
Comment 6 Konstantin Scheglov CLA 2011-08-18 09:48:49 EDT
This looks as error in XWT itself.
I can reproduce it with XWT Forms Application, without WindowBuilder, just by running it.
Comment 7 Eric Clayberg CLA 2011-08-18 13:40:49 EDT
XWT issue