Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367046 - StackOverflowError in Egl2MofStatement
Summary: StackOverflowError in Egl2MofStatement
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-18 22:19 EST by Will Smythe CLA
Modified: 2017-02-23 14:15 EST (History)
4 users (show)

See Also:


Attachments
EGL source file that appears to be causing stack overflow (11.75 KB, application/octet-stream)
2011-12-18 22:19 EST, Will Smythe CLA
no flags Details
Workspace log file (832.93 KB, application/octet-stream)
2011-12-18 22:20 EST, Will Smythe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Smythe CLA 2011-12-18 22:19:38 EST
Created attachment 208529 [details]
EGL source file that appears to be causing stack overflow

See attached EGL source file,which contains a lot of errors. When trying to edit/save this file in EWDT 0.7, I get a popup dialog that indicates there is a StackOverflowError. This bug may be related to bug 367045. 

java.lang.StackOverflowError
	at java.lang.Exception.<init>(Unknown Source)
	at java.lang.reflect.InvocationTargetException.<init>(Unknown Source)
	at sun.reflect.GeneratedConstructorAccessor175.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)v
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.getGeneratorFor(Egl2MofStatement.java:784)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:514)
	at org.eclipse.edt.compiler.core.ast.GetByPositionStatement.accept(GetByPositionStatement.java:340)
	at org.eclipse.edt.compiler.internal.egl2mof.AbstractIOStatementGenerator.genGetByPositionStatement(AbstractIOStatementGenerator.java:126)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:515)
	at org.eclipse.edt.compiler.core.ast.GetByPositionStatement.accept(GetByPositionStatement.java:340)
	at org.eclipse.edt.compiler.internal.egl2mof.AbstractIOStatementGenerator.genGetByPositionStatement(AbstractIOStatementGenerator.java:126)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:515)
	at org.eclipse.edt.compiler.core.ast.GetByPositionStatement.accept(GetByPositionStatement.java:340)
	at org.eclipse.edt.compiler.internal.egl2mof.AbstractIOStatementGenerator.genGetByPositionStatement(AbstractIOStatementGenerator.java:126)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:515)
	at org.eclipse.edt.compiler.core.ast.GetByPositionStatement.accept(GetByPositionStatement.java:340)
	at org.eclipse.edt.compiler.internal.egl2mof.AbstractIOStatementGenerator.genGetByPositionStatement(AbstractIOStatementGenerator.java:126)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:515)
Comment 1 Will Smythe CLA 2011-12-18 22:20:19 EST
Created attachment 208530 [details]
Workspace log file
Comment 2 Will Smythe CLA 2011-12-28 10:25:06 EST
I am seeing this same error/exception in the all-in-one 0.7 IDE.
Comment 3 Paul Harmon CLA 2012-01-17 14:09:52 EST
The problem was caused by the presence of a GetByPosition statement in the testcase. Since this type of statement is not supported by the sql dataSource, the statement generator didnt know what to do with it, so it threw it into an infinite loop.

I have added a validator for this statement, so that an error is thrown that indicates that this type of GET statement is not allowed. I also fixed the IR generator to not go into an infinite loop. 

The following files have been updated:

	IProblemRequestor
	EGLValidationResource.properties
	FunctionValidator
	MoveStatementValidator
	AbstractIOStatementGenerator
	EGL2MofStatement
	IOStatementGenerator
	SQLActionStatementGenerator
	SQLActionStatementValidator
	GetByPositionStatementValidator
	SqlFactory
	SqlFactoryImpl
Comment 4 Will Smythe CLA 2012-02-21 08:02:02 EST
Verified.