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 245600 - NullPointerException at org.apache.tools.ant.module.api.support.TargetLister$Script.<init>
Summary: NullPointerException at org.apache.tools.ant.module.api.support.TargetLister$...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 247511 248399 256123 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-11 18:37 UTC by rkamradt
Modified: 2015-12-23 13:49 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 210667


Attachments
stacktrace (4.17 KB, text/plain)
2014-07-11 18:37 UTC, rkamradt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rkamradt 2014-07-11 18:37:35 UTC
Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b69, Java(TM) SE Runtime Environment, 1.8.0-b128
OS: Windows 7

User Comments:
rkamradt: running ant targets




Stacktrace: 
java.lang.NullPointerException
   at org.apache.tools.ant.module.api.support.TargetLister$Script.<init>(TargetLister.java:296)
   at org.apache.tools.ant.module.api.support.TargetLister.getTargets(TargetLister.java:117)
   at org.apache.tools.ant.module.run.RunTargetsAction$LazyMenu.getPopupMenu(RunTargetsAction.java:197)
   at com.jidesoft.plaf.vsnet.VsnetMenuUI.installListeners(VsnetMenuUI.java:0)
   at com.jidesoft.plaf.vsnet.VsnetMenuItemUI.installUI(VsnetMenuItemUI.java:0)
   at javax.swing.JComponent.setUI(JComponent.java:663)
Comment 1 rkamradt 2014-07-11 18:37:36 UTC
Created attachment 148005 [details]
stacktrace
Comment 2 Ondrej Vrabec 2014-07-16 13:41:53 UTC
funny. Initially caused by com.jidesoft.plaf.vsnet platform (whatever that is). The NPE is thrown because RunTargetsAction$LazyMenu has project set to null. Or more precisely call to RunTargetsAction$LazyMenu.getPopupMenu is done from LazyMenu.super() when LazyMenu is not yet fully initialized and the field project has not yet been set.
Either reassign to 3rd-party (preferably) in case you don't want to fix it (i guess could be worked-around with returning just super.getPopupMenu in case constructor has not yet finished.)
Comment 3 Tomas Stupka 2014-07-18 12:16:14 UTC
let try, hopefully,  to avoid the NPE
Comment 4 Tomas Stupka 2014-07-18 13:33:25 UTC
fixed in core-main #fbd2d37da0d5
Comment 5 Quality Engineering 2014-07-23 02:08:59 UTC
Integrated into 'main-silver', will be available in build *201407230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/fbd2d37da0d5
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #245600 - NullPointerException at org.apache.tools.ant.module.api.support.TargetLister$Script.<init>
Comment 6 Ondrej Vrabec 2014-09-29 08:12:57 UTC
*** Bug 247511 has been marked as a duplicate of this bug. ***
Comment 7 Tomas Stupka 2015-06-11 13:55:35 UTC
*** Bug 248399 has been marked as a duplicate of this bug. ***
Comment 8 Tomas Stupka 2015-12-23 13:49:58 UTC
*** Bug 256123 has been marked as a duplicate of this bug. ***