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.
First I added a new excutor "External -assert" which has been set to the project default. The IDE did not seem to pick this up. Then I set the External Executor to "User". Now, whenever I want to execute a program I get a NullPointerException. Also, the IDE seems to be stuffed up completely as I cannot go to options anymore. ide.log is attached.
Created attachment 10045 [details] ide.log
In the mean time I have discovered that the options window was already open after starting the IDE, but the focus did not go to the options window. I have reset the default values of External Execution and system is working again.
Reassigning to openide
Looks to be regression introduced by fix for issue #28340.
Not hard to reproduce. 1. Start NB 3.5 beta on a fresh user dir. 2. Open the Options window. 3. Select External Execution. Edit the external process, and change ..../java to some nonsense value, like "foo". 4. Select ImageViewer in sampledir. 5. Press Execute. NPE is thrown, as described. I also tried to reproduce with debugger types, since that has similar code, but did not manage it for some reason. The problem is that if you have not explicitly selected a service type for the file, ExecutionSupport.choose is called from startFailed (or perhaps debugFailed, but I could not reproduced this) with a null arg, which can sometimes result in an NPE, depending on the exception. Fix is simple - use the default executor or debugger type in that case.
Created attachment 10079 [details] Patch
Created attachment 10080 [details] Binary patch #1 - place in $nbhome/modules/autoload/patches/org-openide-execution/33078-execution.jar
Created attachment 10081 [details] Binary patch #2 - place in $nbhome/modules/autoload/patches/org-openide-debugger/33078-debugger.jar
Fixed in the trunk: Checking in openide/execution/src/org/openide/loaders/ExecutionSupport.java; /cvs/openide/execution/src/org/openide/loaders/ExecutionSupport.java,v <-- ExecutionSupport.java new revision: 1.7; previous revision: 1.6 done Checking in debuggercore/oldapi/src/org/openide/loaders/ExecSupport.java; /cvs/debuggercore/oldapi/src/org/openide/loaders/ExecSupport.java,v <-- ExecSupport.java new revision: 1.3; previous revision: 1.2 done QA: please evaluate priority. Could be easily merged to 3.5 if desired. I am not sure it is worth it. Impact: if a user edits the default executor (External Execution in the case of .java files, not a clone of it etc.) so that the external process points to some invalid path (generally, so that the process cannot even be started), and then runs a program with no specifically configured executor, the dialog will display an ugly NPE, rather than saying "The service External Execution was not appropriate for this object" and opening the dialog to customize the executor in use or its properties. The detail message (that the process could not be started) is present in the log file but not the GUI.
Jesse, it's perfect. The patch looks fine and cannot cause other problems. The bug should be merged to release 35. Honza, can we add the fix to release 3.5 ?
I agree with merging to 3.5, rising priority to P1.
Checking in openide/execution/src/org/openide/loaders/ExecutionSupport.java; /cvs/openide/execution/src/org/openide/loaders/ExecutionSupport.java,v <-- ExecutionSupport.java new revision: 1.6.2.1; previous revision: 1.6 done Checking in debuggercore/oldapi/src/org/openide/loaders/ExecSupport.java; /cvs/debuggercore/oldapi/src/org/openide/loaders/ExecSupport.java,v <-- ExecSupport.java new revision: 1.2.12.1; previous revision: 1.2 done
*** Issue 33150 has been marked as a duplicate of this issue. ***
*** Issue 32841 has been marked as a duplicate of this issue. ***
verified
*** Issue 34553 has been marked as a duplicate of this issue. ***