Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 166406 - NullPointerException at java.lang.ProcessBuilder.start
NullPointerException at java.lang.ProcessBuilder.start
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: D-Light
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Andrew Krasny
dlight-issues@cnd
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT 67patch1-verified
:
: 168119 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-02 14:59 UTC by alenofx
Modified: 2009-10-08 18:30 UTC (History)
15 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (4.40 KB, text/plain)
2009-06-02 14:59 UTC, alenofx
Details
stacktrace (2.05 KB, text/plain)
2009-06-03 22:19 UTC, antixto
Details
stacktrace (2.05 KB, text/plain)
2009-06-11 22:45 UTC, Exceptions Reporter
Details
stacktrace (4.65 KB, text/plain)
2009-06-17 09:48 UTC, Ivan Sidorkin
Details
stacktrace (4.65 KB, text/plain)
2009-07-08 11:29 UTC, Ivan Sidorkin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alenofx 2009-06-02 14:59:37 UTC
This issue was originally marked as duplicate of issue 165083, that is already resolved. This issue is still valid, so this seems to be another issue, but it might be related.

Build: NetBeans IDE 6.7 RC1 (Build 200905312038)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows 7, 6.1, amd64

User Comments:
alenofx: Starting NetBeans IDE 6.7 RC1

racy: I just started the IDE.



Stacktrace: 
java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getLocalHostInfo(HostInfoImpl.java:130)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getHostInfo(HostInfoImpl.java:100)
        at org.netbeans.modules.nativeexecution.support.HostInfoFetcher.getInfo(HostInfoFetcher.java:82)
        at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:301)
        at org.netbeans.modules.dlight.util.Util.copyResource(Util.java:87)
Comment 1 alenofx 2009-06-02 14:59:47 UTC
Created attachment 83104 [details]
stacktrace
Comment 2 Vladimir Kvashin 2009-06-02 15:22:49 UTC
I guess this might be caused by returning null from
o.n.m.nativeexecution.api.util.WindowsSupport.getShell()
Comment 3 antixto 2009-06-03 22:19:39 UTC
This issue was originally marked as duplicate of issue 165083, that is already resolved. This issue is still valid, so this seems to be another issue, but it might be related.

Build: NetBeans IDE 6.7 RC1 (Build 200905312038)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

User Comments: 
I've previously configured the remote host development on 6.7 Beta version in the same way as I did it with 6.7 RC1. I didn't import the configuration from the previous version and I've uninstalled 6.7 Beta before the installation of RC1.

When I compile the code with F6 it seams to work ok on building, but when NetBeans try to run the compiled application it crash. Output window shows these lines:

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/avilla/src/holamundo'
/usr/bin/make  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/holamundo
make[2]: Entering directory `/home/avilla/src/holamundo'
make[2]: `dist/Debug/GNU-Linux-x86/holamundo' is up to date.
make[2]: Leaving directory `/home/avilla/src/holamundo'
make[1]: Leaving directory `/home/avilla/src/holamundo'
BUILD SUCCESSFUL (total time: 235ms)

Seems like the SSH connection with the remote host was lost before the exception.


Stacktrace: 
java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:0)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getLocalHostInfo(HostInfoImpl.java:130)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getHostInfo(HostInfoImpl.java:100)
        at org.netbeans.modules.nativeexecution.support.HostInfoFetcher.getInfo(HostInfoFetcher.java:82)
        at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:301)
        at org.netbeans.modules.dlight.util.Util.copyResource(Util.java:87)
Comment 4 antixto 2009-06-03 22:19:52 UTC
Created attachment 83180 [details]
stacktrace
Comment 5 Exceptions Reporter 2009-06-11 22:45:17 UTC
Build: NetBeans IDE 6.7 RC2 (Build 200906042131)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows 7, 6.1, amd64

User Comments: 
compile & run a hello.c program with gcc (cygwin)

Stacktrace: 
java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getLocalHostInfo(HostInfoImpl.java:130)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getHostInfo(HostInfoImpl.java:100)
        at org.netbeans.modules.nativeexecution.support.HostInfoFetcher.getInfo(HostInfoFetcher.java:82)
        at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:301)
        at org.netbeans.modules.dlight.util.Util.copyResource(Util.java:87)
Comment 6 Exceptions Reporter 2009-06-11 22:45:21 UTC
Created attachment 83469 [details]
stacktrace
Comment 7 Exceptions Reporter 2009-06-11 22:45:41 UTC
This issue already has 6 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=152126
Comment 8 Ivan Sidorkin 2009-06-17 09:48:44 UTC
Build: NetBeans Platform Dev (Build 090617)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b02
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getLocalHostInfo(HostInfoImpl.java:130)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getHostInfo(HostInfoImpl.java:100)
        at org.netbeans.modules.nativeexecution.support.HostInfoFetcher.getInfo(HostInfoFetcher.java:82)
        at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:301)
        at org.netbeans.modules.dlight.util.Util.copyResource(Util.java:87)
Comment 9 Ivan Sidorkin 2009-06-17 09:48:48 UTC
Created attachment 83677 [details]
stacktrace
Comment 10 Exceptions Reporter 2009-06-17 09:48:53 UTC
This issue already has 8 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=152126
Comment 11 Andrew Krasny 2009-06-17 09:58:29 UTC
This happens when no cygwin nor msys is installed on Windows.
Perhaps we need to display some notification in this case
Comment 12 Exceptions Reporter 2009-06-17 13:08:32 UTC
This issue already has 9 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=152126
Comment 13 Exceptions Reporter 2009-06-18 09:29:01 UTC
This issue already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=152126
Comment 14 Andrew Krasny 2009-06-23 12:52:56 UTC
At last I've got the reason of this exception (as I am almost sure). My guess is that this is because I looked for msys
path in HKLM registry tree only. But in case when user who installed msys is not an Administrator of the machine, the
record about msys paths goes to HKCL tree.

The fix is to look into HKCL as well. 

Fixed with: http://hg.netbeans.org/cnd-main/rev/deb9e7c7d404

=Andrew
Comment 15 Alexander Pepin 2009-06-29 13:22:37 UTC
The fix is already in NB 6.7
Comment 16 Egor Ushakov 2009-06-29 13:33:01 UTC
According to user report it is still reproducible in 6.7 FCS:
java.lang.NullPointerException
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
   at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getLocalHostInfo(HostInfoImpl.java:130)
   at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getHostInfo(HostInfoImpl.java:100)
   at org.netbeans.modules.nativeexecution.support.HostInfoFetcher.getInfo(HostInfoFetcher.java:82)
   at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:301)
   at org.netbeans.modules.nativeexecution.NativeProcessInfo.<init>(NativeProcessInfo.java:119)
   at org.netbeans.modules.nativeexecution.api.NativeProcessBuilder.<init>(NativeProcessBuilder.java:79)
   at org.netbeans.modules.nativeexecution.api.NativeProcessBuilder.newProcessBuilder(NativeProcessBuilder.java:90)
   at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine.startDebugger(GdbProxyEngine.java:138)
   at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine.<init>(GdbProxyEngine.java:132)
   at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxy.<init>(GdbProxy.java:107)
[catch] at org.netbeans.modules.cnd.debugger.gdb.GdbDebugger.startDebugger(GdbDebugger.java:290)
   at org.netbeans.modules.cnd.debugger.gdb.actions.StartActionProvider.doAction(StartActionProvider.java:86)
   at org.netbeans.modules.cnd.debugger.gdb.actions.StartActionProvider$1.run(StartActionProvider.java:131)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)
INFO [org.netbeans.ui.metrics.debugger]: Debugger session AIFXTool.aip started at localhost for C
INFO [org.netbeans.ui.metrics.debugger]: Connecting via connect type Gdb Debugger 
Comment 17 luky 2009-06-29 13:39:52 UTC
Andrew,
Why do you have some special lookup for cygwin when you already know the path - you defined it when setting up compiler.
I just don't understand why do you have to use some another special heuristic to locate it.

I got this exception again in 6.7 fcs
java.lang.NullPointerException
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
   at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getLocalHostInfo(HostInfoImpl.java:130)
   at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getHostInfo(HostInfoImpl.java:100)
   at org.netbeans.modules.nativeexecution.support.HostInfoFetcher.getInfo(HostInfoFetcher.java:82)
   at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:301)
   at org.netbeans.modules.nativeexecution.NativeProcessInfo.<init>(NativeProcessInfo.java:119)
   at org.netbeans.modules.nativeexecution.api.NativeProcessBuilder.<init>(NativeProcessBuilder.java:79)
   at org.netbeans.modules.nativeexecution.api.NativeProcessBuilder.newProcessBuilder(NativeProcessBuilder.java:90)
   at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine.startDebugger(GdbProxyEngine.java:138) 


 Luky
Comment 18 Egor Ushakov 2009-06-29 13:53:28 UTC
reproduced in build 200906241340
Comment 19 Andrew Krasny 2009-06-29 18:46:27 UTC
This is because of cygwin1.7 that uses different registry key to store information about it's location... 
Fixed with http://hg.netbeans.org/cnd-main/rev/6aa038ba20a6
Also now executor will find sh if the path to it is in %PATH%


I will file a new (low priority) issue to redesign the way we are looking for sh (to avoid duplication of searching logic)
Comment 20 Alexander Pepin 2009-06-30 09:29:34 UTC
marked as patch1 candidate once again
Comment 21 Alexander Pepin 2009-07-03 14:09:05 UTC
verified in dev build
Comment 22 pgebauer 2009-07-03 14:31:36 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/96d50c138613
Comment 23 Ivan Sidorkin 2009-07-08 11:29:05 UTC
Build: NetBeans Platform Dev (Build 090707)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b02
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getLocalHostInfo(HostInfoImpl.java:128)
        at org.netbeans.modules.nativeexecution.support.HostInfoImpl.getHostInfo(HostInfoImpl.java:100)
        at org.netbeans.modules.nativeexecution.support.HostInfoFetcher.getInfo(HostInfoFetcher.java:82)
        at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:301)
        at org.netbeans.modules.dlight.util.Util.copyResource(Util.java:87)
Comment 24 Ivan Sidorkin 2009-07-08 11:29:15 UTC
Created attachment 84484 [details]
stacktrace
Comment 25 Vladimir Kvashin 2009-07-13 14:40:26 UTC
*** Issue 168119 has been marked as a duplicate of this issue. ***
Comment 26 Alexander Pepin 2009-07-15 15:43:36 UTC
verified in nb6.7.1rc
Comment 27 tk_fhd_aui 2009-08-25 10:24:48 UTC
The issue seems not to be fixed, as a colleague of me had the same exception right now. The problem was, what he had a 
whitespace in his Windows Path for cygwin ...;C:\CYGWIN\BIN ;...
Shall I reopen?
Comment 28 Andrew Krasny 2009-08-25 11:43:34 UTC
tk_fhd_aui, 

thank you for reporting the problem. You could open a new P3 issue with the exact description of the problem (space in
cygwin installation path) and with NB version number specified...

But this and other related problems are (should be) already fixed in the trunk... So I would suggest you to try latest
builds...


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo