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

Bug 359809

Summary: [exceptions] NullPointerException during Requesting JavaScript AST from selection
Product: [WebTools] JSDT Reporter: Victor Homyakov <vkhomyackov>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: thomas.joiner
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Exception info from Error Log
none
Error log on windows
none
Javascript file to reproduce the error none

Description Victor Homyakov CLA 2011-10-04 05:46:47 EDT
Build Identifier: M20110909-1335

While editing JavaScript file in web project Eclipse shows popup with error message:
An internal error occurred during: "Requesting JavaScript AST from selection".
java.lang.NullPointerException

(stacktrace from error log in attachment)

Reproducible: Couldn't Reproduce

Steps to Reproduce:
1. Edit JSP and JS files.
Comment 1 Victor Homyakov CLA 2011-10-04 05:48:52 EDT
Created attachment 204499 [details]
Exception info from Error Log
Comment 2 Nitin Dahyabhai CLA 2011-10-11 11:46:00 EDT
Victor, you've increased the severity.  Does that mean you're reliably able to reproduce it?
Comment 3 Victor Homyakov CLA 2011-10-12 11:18:23 EDT
(In reply to comment #2)
> Does that mean you're reliably able to reproduce it?

No. But it happens more and more often - I should constantly close popups while working with JavaScript sources.
Comment 4 Thomas CLA 2011-10-19 16:51:17 EDT
Created attachment 205566 [details]
Error log on windows

I am getting this exception as well.
Comment 5 Thomas CLA 2011-10-19 16:57:07 EDT
Created attachment 205568 [details]
Javascript file to reproduce the error

This file is able to cause the error to occur.

Around 80% of the time if you place the cursor at the end of line 4, it will throw the exception.  If it doesn't throw it, then it will 100% of the time if I dirty the buffer (even adding a space and then deleting it).
Comment 6 Victor Homyakov CLA 2011-10-20 04:36:18 EDT
(In reply to comment #5)
> This file is able to cause the error to occur.
Agree. But only in JavaScript project (Project Properties - Project Facets - JavaScript is checked). In usual Java project this script causes no errors.
Comment 7 Thomas CLA 2011-10-20 09:42:11 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > This file is able to cause the error to occur.
> Agree. But only in JavaScript project (Project Properties - Project Facets -
> JavaScript is checked). In usual Java project this script causes no errors.

Ah, I hadn't tested it out in a plain Javascript project.
Comment 8 Thomas CLA 2011-10-20 09:43:01 EDT
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > This file is able to cause the error to occur.
> > Agree. But only in JavaScript project (Project Properties - Project Facets -
> > JavaScript is checked). In usual Java project this script causes no errors.
> 
> Ah, I hadn't tested it out in a plain Javascript project.

In a plain Java project, sorry.
Comment 9 Nitin Dahyabhai CLA 2011-10-25 13:17:02 EDT

*** This bug has been marked as a duplicate of bug 359005 ***