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 268405

Summary: NullPointerException at org.netbeans.modules.javascript.nodejs.exec.NpmExecutable.stopRunningScript
Product: javascript Reporter: ravshansbox
Component: Node.jsAssignee: Tomas Mysik <tmysik>
Status: VERIFIED FIXED    
Severity: normal CC: stezeb, tmysik, vriha
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 226311
Attachments: stacktrace

Description ravshansbox 2016-10-07 11:49:39 UTC
Build: NetBeans IDE 8.2 (Build 201609300101)
VM: OpenJDK 64-Bit Server VM, 25.91-b14, OpenJDK Runtime Environment, 1.8.0_91-8u91-b14-3ubuntu1~16.04.1ppa1-b14
OS: Linux

User Comments:
GUEST: Tried to run an npm script from PHP project context menu.  Worked in 8.0.2, script hasn't changed between NB versions.

GUEST: Just trying to start an npm script off the context menu for a PHP project.

ravshansbox: problem on running npm script




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javascript.nodejs.exec.NpmExecutable.stopRunningScript(NpmExecutable.java:346)
   at org.netbeans.modules.javascript.nodejs.exec.NpmExecutable.runScript(NpmExecutable.java:153)
   at org.netbeans.modules.javascript.nodejs.ui.actions.NpmRunScriptAction$1$1.run(NpmRunScriptAction.java:193)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
   at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
   at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
Comment 1 ravshansbox 2016-10-07 11:49:41 UTC
Created attachment 162392 [details]
stacktrace
Comment 2 Exceptions Reporter 2016-10-20 23:41:35 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=226311
Comment 3 Tomas Mysik 2016-10-21 07:15:45 UTC
Caused by fixing issue #257237. This problem occurs in other project types than HTML5 project (so e.g. PHP project). Will fix it and mark as a patch candidate for NB 8.2 - it would be great if you could anyone the fix once it appears in a dev build.

Thanks.
Comment 4 Tomas Mysik 2016-10-21 07:22:44 UTC
Fixed, please verify. Thanks.

http://hg.netbeans.org/web-main/rev/87c1e08e9758
Comment 5 Quality Engineering 2016-10-22 02:16:29 UTC
Integrated into 'main-silver', will be available in build *201610220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/87c1e08e9758
User: Tomas Mysik <tmysik@netbeans.org>
Log: #268405 - NullPointerException at org.netbeans.modules.javascript.nodejs.exec.NpmExecutable.stopRunningScript

Caused by fixing issue #257237.
Comment 6 aner 2016-10-24 14:21:20 UTC
This fixes the issue for me using version netbeans-trunk-nightly-201610240002-javaee-linux.sh
Comment 7 Tomas Mysik 2016-10-25 08:38:44 UTC
(In reply to aner from comment #6)
> This fixes the issue for me using version
> netbeans-trunk-nightly-201610240002-javaee-linux.sh

Thanks a lot for verification!
Comment 8 Tomas Mysik 2016-12-03 14:39:29 UTC
Transplanted to the releases repo branch release82:

http://hg.netbeans.org/releases/rev/8f9a751c64a0

Thanks.
Comment 9 Stepan Zebra 2016-12-13 14:22:34 UTC
verified in NB 8.2 Patch 1