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.
Build: NetBeans IDE 7.0 (Build 201104080000) VM: Java HotSpot(TM) 64-Bit Server VM, 19.1-b02, Java(TM) SE Runtime Environment, 1.6.0_24-b07 OS: Windows 7 User Comments: GUEST: Scanning a Symfony 2 project GUEST: Opened a Project with the IDE. After that the "Scanning Projects" started and came up with this error after some minutes. LuoJun: code php5.3 namespace, project set version is php5.1/5.2. Stacktrace: java.lang.NullPointerException at org.netbeans.modules.php.editor.model.impl.ModelVisitor.visit(ModelVisitor.java:882) at org.netbeans.modules.php.editor.parser.astnodes.FunctionDeclaration.accept(FunctionDeclaration.java:116) at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor.scan(DefaultVisitor.java:54) at org.netbeans.modules.php.editor.model.impl.ModelVisitor.scan(ModelVisitor.java:173) at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor.scan(DefaultVisitor.java:61) at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor.visit(DefaultVisitor.java:93)
Created attachment 108785 [details] stacktrace
I don't know why this happen. Basically it shouldn't happen. I will add a few logs.
Created attachment 109343 [details] stacktrace 1, added folder with nette.min onto include path -> NPE appears
Created attachment 109386 [details] stacktrace PHP project with Nette plugin
Created attachment 109451 [details] stacktrace first open of php project with nette framework (with minimized nette version)
Created attachment 109566 [details] stacktrace
33 duplicates, increasing priority. Have a look at the Exception Reporter page for possible steps to reproduce. Thanks.
It appears when there is a file which contains a namespace declaration using bracket notation with no name (so it's default namespace). I.e. minified nette framework file. It can't be simply fixed on the line of occurace with "!= null" expression, because then appears another CCE at another place, so I think that it should be fixed deeper...but I don't see that bottom ;) So reassigning to Petr.
not for 7.0.1
Created attachment 110168 [details] stacktrace opened Nette project
It looks like the problem is when there are more default namespaces in one file.
Fixed in webmain
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/98afd1d004d1 User: Petr Pisl <ppisl@netbeans.org> Log: #199243 - NullPointerException at org.netbeans.modules.php.editor.model.impl.ModelVisitor.visit
*** Bug 197826 has been marked as a duplicate of this bug. ***
verified