Bug 318179 - [exceptions] AST creation error when setting breakpoint
Summary: [exceptions] AST creation error when setting breakpoint
Status: RESOLVED WORKSFORME
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Project Inbox CLA
QA Contact: Simon Kaegi CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks: 327019
  Show dependency tree
 
Reported: 2010-06-28 09:54 EDT by Simon Kaegi CLA
Modified: 2014-08-11 11:05 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2010-06-28 09:54:08 EDT
From the rhino newsgroup...

Jürg Lehni reports:

Whenever I try to set a breakpoint in any of the scripts, I get a lot of 
Exceptions such as the one below.

java.lang.IllegalArgumentException
		 at org.eclipse.wst.jsdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2490)
		 at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1016)
		 at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1480)
		 at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:734)
		 at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1417)
		 at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationFragment(ASTConverter.java:2637)
		 at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationStatement(ASTConverter.java:2662)
		 at org.eclipse.wst.jsdt.core.dom.ASTConverter.checkAndAddMultipleLocalDeclaration(ASTConverter.java:317)
		 at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1142)
		 at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.convert(JavaScriptUnitResolver.java:262)
		 at org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:887)
		 at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
		 at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:581)
		 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
		 at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:574)
		 at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
		 at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:150)
		 at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:135)
		 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Nitin Dahyabhai CLA 2010-06-28 10:42:06 EDT
I think we need more information to go on, otherwise I'll have to just close this.
Comment 2 Lehni CLA 2010-06-28 11:53:55 EDT
I am the one originally reporting this issue, and I can provide more information:

I just did further tests, and created a JavaScript project containing the script I was debugging (a simple dummy script that I only used to test breakpoints, nothing worth posting here. From within the project debugging then worked without any issues. But what does not work is this:

Opening a JavaScript file not associated with a project using the File -> Open File... menu, and then trying to add a breakpoint to it. This produces the stack trace reported above. I hope this makes it clearer?
Comment 3 Chris Jaun CLA 2010-09-07 15:35:49 EDT
When I try to add a breakpoint to a file not in my workspace, nothing happens. No error dialog, no error in the log, and no breakpoints set.

Moving this to debug to investigate.
Comment 4 Michael Rennie CLA 2010-09-08 09:53:35 EDT
I have not been able to reproduce the stacktrace either. Lehni, do you have a snippet we could test with that does produce the problem?

> When I try to add a breakpoint to a file not in my workspace, nothing happens.
> No error dialog, no error in the log, and no breakpoints set.

Chris does the breakpoint appear in the breakpoints view? If so this is a dupe of bug 289119.
Comment 5 Michael Rennie CLA 2010-11-23 01:50:43 EST
We have not been able to reproduce this, closing as WORKSFORME
Comment 6 Udo Walker CLA 2014-08-11 11:05:54 EDT
I got the same error today in Eclipse Luna for DSL Developers.

I got 2 different stack traces:

1.:
-------------------------------

!ENTRY org.eclipse.wst.jsdt.ui 4 0 2014-08-05 14:49:39.706
!MESSAGE Error in JSDT Core during reconcile
!STACK 0
java.lang.IllegalArgumentException
	at org.eclipse.wst.jsdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2490)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1026)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1508)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:741)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1445)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationFragment(ASTConverter.java:2665)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationStatement(ASTConverter.java:2690)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.checkAndAddMultipleLocalDeclaration(ASTConverter.java:319)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1170)
	at org.eclipse.wst.jsdt.core.dom.AST.convertCompilationUnit(AST.java:264)
	at org.eclipse.wst.jsdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:265)
	at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:241)
	at org.eclipse.wst.jsdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:538)
	at org.eclipse.wst.jsdt.internal.core.CompilationUnit.makeConsistent(CompilationUnit.java:1117)
	at org.eclipse.wst.jsdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:177)
	at org.eclipse.wst.jsdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:96)
	at org.eclipse.wst.jsdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:742)
	at org.eclipse.wst.jsdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:802)
	at org.eclipse.wst.jsdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1272)
	at org.eclipse.wst.jsdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:95)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.wst.jsdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:76)
	at org.eclipse.wst.jsdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:143)
	at org.eclipse.wst.jsdt.internal.ui.text.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:85)
	at org.eclipse.wst.jsdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile(JavaCompositeReconcilingStrategy.java:94)
	at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77)
	at org.eclipse.wst.jsdt.internal.ui.text.JavaReconciler.process(JavaReconciler.java:371)
	at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)


2.
---------------------------------
!ENTRY org.eclipse.wst.jsdt.ui 4 0 2014-08-05 14:49:39.948
!MESSAGE Error in JSDT Core during AST creation
!STACK 0
java.lang.IllegalArgumentException
	at org.eclipse.wst.jsdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2490)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1026)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1508)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:741)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1445)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationFragment(ASTConverter.java:2665)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationStatement(ASTConverter.java:2690)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.checkAndAddMultipleLocalDeclaration(ASTConverter.java:319)
	at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1170)
	at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.convert(JavaScriptUnitResolver.java:262)
	at org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:887)
	at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
	at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:581)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:574)
	at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
	at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:150)
	at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:135)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)