Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357353 - ArrayIndexOutOfBoundsException in UnconditionalFlowInfo#markAsDefinitelyNonNull() with FieldReference
Summary: ArrayIndexOutOfBoundsException in UnconditionalFlowInfo#markAsDefinitelyNonNu...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal with 3 votes (vote)
Target Milestone: 3.5.1   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
: 375703 378540 414325 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-12 05:06 EDT by Bernhard Mising name CLA
Modified: 2013-08-14 15:50 EDT (History)
11 users (show)

See Also:
cmjaun: review+


Attachments
The patch fixes the issue (1.12 KB, patch)
2012-05-12 06:51 EDT, Victor Rubezhny CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Mising name CLA 2011-09-12 05:06:18 EDT
Build Identifier: 20110615-0604

!ENTRY org.eclipse.core.resources 4 75 2011-09-12 11:04:08.972
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.wst.jsdt.core 4 75 2011-09-12 11:04:08.972
!MESSAGE Errors running builder 'JavaScript Validator' on project 'Vitruvian'.
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 13
	at org.eclipse.wst.jsdt.internal.compiler.flow.UnconditionalFlowInfo.markAsDefinitelyNonNull(UnconditionalFlowInfo.java:1193)
	at org.eclipse.wst.jsdt.internal.compiler.ast.FieldReference.analyseAssignment(FieldReference.java:80)
	at org.eclipse.wst.jsdt.internal.compiler.ast.Assignment.analyseCode(Assignment.java:63)
	at org.eclipse.wst.jsdt.internal.compiler.ast.Block.analyseCode(Block.java:48)
	at org.eclipse.wst.jsdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:91)
	at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:91)
	at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.analyseCode(AbstractMethodDeclaration.java:109)
	at org.eclipse.wst.jsdt.internal.compiler.ast.FunctionExpression.analyseCode(FunctionExpression.java:73)
	at org.eclipse.wst.jsdt.internal.compiler.ast.FieldReference.analyseAssignment(FieldReference.java:91)
	at org.eclipse.wst.jsdt.internal.compiler.ast.Assignment.analyseCode(Assignment.java:63)
	at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:91)
	at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.analyseCode(AbstractMethodDeclaration.java:109)
	at org.eclipse.wst.jsdt.internal.compiler.ast.FunctionExpression.analyseCode(FunctionExpression.java:73)
	at org.eclipse.wst.jsdt.internal.compiler.ast.Expression.analyseCode(Expression.java:184)
	at org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:65)
	at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:155)
	at org.eclipse.wst.jsdt.internal.compiler.Compiler.process(Compiler.java:589)
	at org.eclipse.wst.jsdt.internal.compiler.Compiler.compile(Compiler.java:347)
	at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:288)
	at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:86)
	at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:227)
	at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:58)
	at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:291)
	at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:194)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Reproducible: Always

Steps to Reproduce:
1. Happens during validation
2.
3.
Comment 1 Nitin Dahyabhai CLA 2012-03-30 15:51:26 EDT
*** Bug 375703 has been marked as a duplicate of this bug. ***
Comment 2 Victor Rubezhny CLA 2012-05-12 06:51:31 EDT
Created attachment 215521 [details]
The patch fixes the issue

The patch adds re-allocating UnconditionalFlowInfo.extra arrays when vectorIndex greater than length of the extra vectors.
Comment 3 Justin Early CLA 2013-01-29 12:59:41 EST
Per this thread [1] vjet team was asked to look at this bug to see if it also applies to vjet.

This bug doesn't apply to VJET currently. VJET only uses the JSDT parser. It does not use the JSDT compiler. VJET has it's own validator which I have not been able to reproduce this error. 

[1] http://dev.eclipse.org/mhonarc/lists/vjet-dev/msg00022.html
Comment 4 Michael Rennie CLA 2013-05-02 16:15:44 EDT
*** Bug 378540 has been marked as a duplicate of this bug. ***
Comment 5 Michael Rennie CLA 2013-05-02 16:17:07 EDT
Confirmed using jsdt 3.5 that the problem can be reproduced using the d3.js file from: https://raw.github.com/mbostock/d3/master/d3.js
Comment 6 Jorge Padilla CLA 2013-06-19 14:34:34 EDT
Chris, I have reviewed this patch and validated it resolves this problem.  I recommend it to be included in 3.5.1.  Could you officially complete 
this review?
Comment 7 Chris Jaun CLA 2013-06-26 11:07:52 EDT
Patch looks good. Approved.
Comment 8 Chris Jaun CLA 2013-07-09 14:57:21 EDT
Victor,

If you haven't yet, you need to sign the Contributor License Agreement for us to pull in your patch.

See point #1 and #2 in the Bugzilla section at this link for details: http://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions

Thanks,
Chris
Comment 9 Victor Rubezhny CLA 2013-07-09 16:11:52 EDT
Chris,

I've signed it.

Thanks,
Victor
Comment 10 Michael Rennie CLA 2013-08-07 16:19:44 EDT
*** Bug 414325 has been marked as a duplicate of this bug. ***
Comment 11 Chris Jaun CLA 2013-08-14 15:50:14 EDT
Pushed to 3.5.1 and master.