Bug 529278 - Nullpointer exception on save
Summary: Nullpointer exception on save
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.10 M7   Edit
Assignee: Victor Rubezhny CLA
QA Contact: Victor Rubezhny CLA
URL:
Whiteboard:
Keywords: needinfo
: 519414 519953 521076 521425 527126 531017 532685 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-28 09:17 EST by Floris Venhuizen CLA
Modified: 2018-04-04 18:34 EDT (History)
8 users (show)

See Also:


Attachments
Image of the error pop-up (37.43 KB, image/png)
2017-12-28 09:17 EST, Floris Venhuizen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Floris Venhuizen CLA 2017-12-28 09:17:37 EST
Created attachment 272066 [details]
Image of the error pop-up

When saving a specific text, the eclipse UI will prompt a Nullpointer exception. The file is saved, but when the file is closed and opened again, the file cannot be opened.

The text is:

<quote>
    Test = {
            /**/
            test: function(mode) {
            	var i;
            	if (true)
            		i = 0;
            	else {
            		i = 1;
            	i = 2;
            }
    }
	
    Ios = {
</quote>

The thing is, when i add a ';' or remove the '/**/' or remove a '{' the file does save as normal.

Add ';' (line 11)
<quote>
    Test = {
            /**/
            test: function(mode) {
            	var i;
            	if (true)
            		i = 0;
            	else {
            		i = 1;
            	i = 2;
            }
    };
	
    Ios = {
</quote>
Remove '/**/' (line 2)
<quote>
    Test = {
            test: function(mode) {
            	var i;
            	if (true)
            		i = 0;
            	else {
            		i = 1;
            	i = 2;
            }
    }
	
    Ios = {
</quote>
remove '{' (line 7)
<quote>
    Test = {
            /**/
            test: function(mode) {
            	var i;
            	if (true)
            		i = 0;
            	else
            		i = 1;
            	i = 2;
            }
    }
	
    Ios = {
</quote>

I have no clue why this happens.
Comment 1 Andrey Loskutov CLA 2017-12-28 09:35:45 EST
Please attach the error *stack trace*, not just the screenshot.
Comment 2 Patrik Suzzi CLA 2018-02-08 18:24:02 EST
This seems a JavaScript problem. I recall a similar issue in JSDT with very specific text. Moving to JSDT. Please, move back if not correct. Also, a stack trace would really help.
Comment 3 Eclipse Genie CLA 2018-04-04 17:25:37 EDT
New Gerrit change created: https://git.eclipse.org/r/120746
Comment 5 Victor Rubezhny CLA 2018-04-04 18:07:36 EDT
*** Bug 527126 has been marked as a duplicate of this bug. ***
Comment 6 Victor Rubezhny CLA 2018-04-04 18:10:49 EDT
*** Bug 521076 has been marked as a duplicate of this bug. ***
Comment 7 Victor Rubezhny CLA 2018-04-04 18:11:42 EDT
*** Bug 532685 has been marked as a duplicate of this bug. ***
Comment 8 Victor Rubezhny CLA 2018-04-04 18:13:12 EDT
*** Bug 519953 has been marked as a duplicate of this bug. ***
Comment 9 Victor Rubezhny CLA 2018-04-04 18:27:16 EDT
*** Bug 531017 has been marked as a duplicate of this bug. ***
Comment 10 Victor Rubezhny CLA 2018-04-04 18:32:20 EDT
*** Bug 521425 has been marked as a duplicate of this bug. ***
Comment 11 Victor Rubezhny CLA 2018-04-04 18:34:17 EDT
*** Bug 519414 has been marked as a duplicate of this bug. ***