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 258110 - NullPointerException at org.netbeans.modules.nativeexecution.NativeProcessInfo.setArguments
Summary: NullPointerException at org.netbeans.modules.nativeexecution.NativeProcessInf...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 8.1
Hardware: PC Windows 10
: P3 normal (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-23 09:47 UTC by Exceptions Reporter
Modified: 2017-07-20 17:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 222668


Attachments
stacktrace (759 bytes, text/plain)
2016-02-23 09:47 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2016-02-23 09:47:38 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) Client VM, 25.65-b01, Java(TM) SE Runtime Environment, 1.8.0_65-b17
OS: Windows XP

User Comments:
GUEST: validation tool collection on local host problem.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.nativeexecution.NativeProcessInfo.setArguments(NativeProcessInfo.java:202)
   at org.netbeans.modules.nativeexecution.api.NativeProcessBuilder.setArguments(NativeProcessBuilder.java:306)
   at org.netbeans.modules.cnd.cncppunit.LibraryChecker.isLibraryAvailable(LibraryChecker.java:116)
   at org.netbeans.modules.cnd.cncppunit.editor.filecreation.TestLibChecker.run(TestLibChecker.java:93)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
   at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
Comment 1 Exceptions Reporter 2016-02-23 09:47:40 UTC
Created attachment 158609 [details]
stacktrace
Comment 2 ilia 2016-07-18 16:59:47 UTC
Some results after investigation of this bug:

In LibraryChecker.isLibraryAvailable the dummySourceFile variable seems to be null. It may be null after calling the convertToCompilerPath method, which returns null in case the activeShell is null if we are converting to/from Cygwin path. 

Preliminary conclusion:
Cygwin paths in a toolchain may be corrupted.
Comment 3 ilia 2017-06-26 09:38:21 UTC
Able to reproduce the exception: happens if WindowsSupport.findShell returns null. It seems this exception can also occur when toolchain validates for too long (and both users reported this exception complain about long validation). In this case currentShell is just not initialized yet and we get an NPE.
Comment 4 Quality Engineering 2017-07-20 17:51:54 UTC
Integrated into 'main-silver', will be available in build *201707201608* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6b64aaf42e19
User: Ilia Gromov <ilia@netbeans.org>
Log: Fixed #258110 - NullPointerException at org.netbeans.modules.nativeexecution.NativeProcessInfo.setArguments