This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 268649 - NullPointerException at org.netbeans.modules.javascript2.editor.JsStructureScanner.folds
Summary: NullPointerException at org.netbeans.modules.javascript2.editor.JsStructureSc...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal (vote)
Assignee: Reema
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-24 00:20 UTC by luchonetvv
Modified: 2017-05-15 09:00 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 226117


Attachments
stacktrace (2.73 KB, text/plain)
2016-10-24 00:20 UTC, luchonetvv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description luchonetvv 2016-10-24 00:20:51 UTC
Build: NetBeans IDE 8.2 (Build 201610071157)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.112-b16, Java(TM) SE Runtime Environment, 1.8.0_112-b16
OS: Mac OS X

User Comments:
thilina01: opening a file from project tree after editing the file outside the netbeans

alex_sav: When i open an js file,then there aren't different colours to each code .So,net beans has a notificaition for unexpected error ,but i don't understand the problem.I have this version of net beans to another computer and it works correctly!

wickund: Typing javascript

wissenstein: I opened a JavaScript file and got this exception.

luchonetvv: Al abrir el archivo main.js del proyecto de Tipo NodeJS Application.

GUEST: replacing files

luchonetvv: Al abrir un archivo del nuevo proyecto de tipo NodeJS Application.

luchonetvv: Estaba descargando el fuente de nodejs cuando estaba creando un nuevo proyecto de NodeJS Application.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javascript2.editor.JsStructureScanner.folds(JsStructureScanner.java:300)
   at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.scan(GsfFoldManager.java:528)
   at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask.access$100(GsfFoldManager.java:268)
   at org.netbeans.modules.csl.editor.fold.GsfFoldManager$JavaElementFoldTask$1.run(GsfFoldManager.java:434)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
Comment 1 luchonetvv 2016-10-24 00:20:53 UTC
Created attachment 162603 [details]
stacktrace
Comment 2 Exceptions Reporter 2017-03-14 07:03:39 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=226117
Comment 3 arusinha 2017-03-17 04:26:19 UTC
(In reply to Exceptions Reporter from comment #2)
> This bug already has 20 duplicates 
> see http://statistics.netbeans.org/exceptions/detail.do?id=226117



I was trying to reproduce the bug in NetBeans IDE 8.2 (Build 201609300101), but not able to simulate the issue.I followed the steps as mentioned in the link
http://statistics.netbeans.org/exceptions/detail.do?id=226117

Steps I followed are as under:

1. Imported the project https://gitlab.com/wissenstein/nb-js-editor-experiments.git in Netbeans.
2. Modified the JS files present in src\main\webapp\js directory (angular.js/default.js) from windows notepad.
3.Then opened those JS files in NetBeans IDE. It was able display the text in JS files properly without any exception.

Please let me know how can we simulate the issue in NetBeans IDE 8.2 or I missed some steps
Comment 4 Quality Engineering 2017-05-12 01:45:09 UTC
Integrated into 'main-silver', will be available in build *201705120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f409ce06e51f
User: Reema <Reema@netbeans.org>
Log: #268649: Fix NPE in JsStructureScanner.folds