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 196327 - 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: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-04 19:21 UTC by Vladimir Kvashin
Modified: 2011-03-06 05:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 177278


Attachments
stacktrace (1.22 KB, text/plain)
2011-03-04 19:21 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2011-03-04 19:21:46 UTC
Build: NetBeans IDE Dev (Build 110304-092d6bf19c28)
VM: Java HotSpot(TM) Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: SunOS

User Comments:
vkvashin: NPE occurred when creating a simple project based on existing sources,
it had only two files: Makefile and test_io.c, below is the files content
---------- Makefile: ---------- 
test.exe:
        gcc -g -o test_io test_io.c

clean:
        rm -f test_io

---------- test_io.c ----------
#include <stdio.h>

void go();

int main(int argc, char**argv) {
    go();
    return 0;
}

void go() {
    int i;
    printf("Hello!\n");

    char *prompt = "\nType a string (or 'q' when done) >>>\n";
    for (i = 0; i < 25; i++) {
        char line[132];
        if (feof(stdin))
            break;
        printf(prompt);
        fflush(stdout);
        scanf("%s", line);
        printf("Read: %s\n", line);
        if (line[0] == 'q' || line[0] == 'Q')
            break;
    }
}




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.nativeexecution.NativeProcessInfo.setArguments(NativeProcessInfo.java:173)
   at org.netbeans.modules.nativeexecution.api.NativeProcessBuilder.setArguments(NativeProcessBuilder.java:267)
   at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.fileExists(HostInfoUtils.java:113)
   at org.netbeans.modules.cnd.discovery.projectimport.ImportProject$5.executionFinished(ImportProject.java:859)
   at org.netbeans.modules.cnd.actions.AbstractExecutorRunAction$ProcessChangeListener.run(AbstractExecutorRunAction.java:564)
   at org.netbeans.modules.nativeexecution.api.execution.NativeExecutionService$PostRunnable.run(NativeExecutionService.java:344)
Comment 1 Vladimir Kvashin 2011-03-04 19:21:49 UTC
Created attachment 106730 [details]
stacktrace
Comment 2 Vladimir Kvashin 2011-03-04 19:31:52 UTC
I've got this again, on a different project.
AFAIU, the reason is in 

org.netbeans.modules.cnd.discovery.projectimport.ImportProject$5.executionFinished(ImportProject.java:859)

that passes null argument
Comment 3 Alexander Simon 2011-03-04 20:07:03 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/3dc43574b63b
Comment 4 Quality Engineering 2011-03-06 05:39:52 UTC
Integrated into 'main-golden', will be available in build *201103060000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3dc43574b63b
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #196327 NullPointerException at org.netbeans.modules.nativeexecution.NativeProcessInfo.setArguments