Bug 531653 - ArrayIndexOutOfBounds
Summary: ArrayIndexOutOfBounds
Status: NEW
Alias: None
Product: DLTK
Classification: Technology
Component: Common (show other bugs)
Version: 5.8.2   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dltk.common-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-26 02:29 EST by mep eisen CLA
Modified: 2018-03-23 12:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mep eisen CLA 2018-02-26 02:29:31 EST
I got randomly following exceptions in my LUA Projects (Eclipse LDT).
While debugging I found out that the same instance of TodoTaskSimpleParser is used in multiple threads.

While having instance variables (contentPos and contentEnd) the threads will battle against each other for updating the variables parsing different contents. Some of them run out of scope and get into trouble.


java.lang.ArrayIndexOutOfBoundsException: 3579
	at org.eclipse.dltk.compiler.task.TodoTaskSimpleParser.findEndOfLine(TodoTaskSimpleParser.java:159)
	at org.eclipse.dltk.compiler.task.TodoTaskSimpleParser.parse(TodoTaskSimpleParser.java:80)
	at org.eclipse.dltk.compiler.task.TodoTaskSimpleParser.parse(TodoTaskSimpleParser.java:70)
	at org.eclipse.dltk.core.builder.AbstractTodoTaskBuildParticipantType$TodoTaskBuildParticipant.build(AbstractTodoTaskBuildParticipantType.java:86)
	at org.eclipse.dltk.internal.core.builder.StandardScriptBuilder.buildModule(StandardScriptBuilder.java:344)
	at org.eclipse.dltk.internal.core.builder.StandardScriptBuilder.processModule(StandardScriptBuilder.java:287)
	at org.eclipse.dltk.internal.core.builder.StandardScriptBuilder.access$0(StandardScriptBuilder.java:282)
	at org.eclipse.dltk.internal.core.builder.StandardScriptBuilder$BuildModulesJob.run(StandardScriptBuilder.java:81)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Comment 1 Nicolas Pactet CLA 2018-03-23 12:20:33 EDT
Looks like a duplicate of #522195.