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 Dev (Build 201003031246) VM: Java HotSpot(TM) Client VM, 14.3-b01, Java(TM) SE Runtime Environment, 1.6.0_17-b04 OS: Windows 7 User Comments: alganet: Issue related to the ":?" short ternary operator. If I remove the PHP lines in which they appear, the error stops. Updated just now and the error is still present Stacktrace: java.lang.NullPointerException at org.netbeans.modules.php.editor.indent.WSTransformer.visit(WSTransformer.java:753) at org.netbeans.modules.php.editor.parser.astnodes.ConditionalExpression.accept(ConditionalExpression.java:94) at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor.scan(DefaultVisitor.java:51) at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor.visit(DefaultVisitor.java:79) at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultTreePathVisitor.visit(DefaultTreePathVisitor.java:174) at org.netbeans.modules.php.editor.parser.astnodes.Assignment.accept(Assignment.java:109)
Created attachment 94805 [details] stacktrace
Mine is caused by PHP templates. When I hit tab to expand one, this is the exception I get.
Actually, now it's happening on expanding just about anything.
Raising to P1, as now the product is unusable.
Petre, can you please fix this? This bug is a showstopper for one NetCAT 6.9 participant and avoids him to continue. Thanks a lot!
Product Version: NetBeans IDE Dev (Build 100310-9ff6c4eb76b6) Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01 @laurin: I can't reproduce. could you give me some example or a file where it happens? I don't have any exception when expanding templates and don't have it even if I use ternary operator as you mentioned in exception report. This is not P1 but P2. Easy workaround for a while: don't use template but type the code till this is fixed. thanks a lot.
The ternary comment is not mine. This happens for Templates AND AutoComplete. That makes it unusable. I can't complete functions or methods without getting this error.
Created attachment 94995 [details] Test project that generates this exception I moved this file to a new project and it still generates the exception. Do this: * type self:: and then control-space, select ProgressTrackingUI() and hit enter. Does it every time for me. * Does it on ec and then control-space, selecting echo. same exception.
I've added a test file and instructions in the Details of how to get the Exception every single time, at least on my machine.
It's caused with a conditional expression without the true value like: $sPhase = substr($sPhaseTeam, 1, 1) ?: '' Fixed in the trunk. Thanks for the reproducible case. It was very helpful and easy to fix. Fixed in the webmain changeset: 163069:cfe17d9e0214
Ok, I just tried it in the latest Hudson build and is not working. Here is my template: $oTable = new Table(); $oTable->sTableStyle = ""; $oTable->sTableClass = ""; $oTable->iBorder = ; $oTable->iCellPadding = ; $oTable->iCellSpacing = ; $oTable->Cell(); here is the result from typing table and pressing tab: $oTable = new Table(); $oTable->sTableStyle = ""; $oTable->sTableClass = ""; $oTable->iBorder = ; $oTable->iCellPadding = ; $oTable->iCellSpacing = ; $oTable->Cell();
(In reply to comment #11) > Ok, I just tried it in the latest Hudson build and is not working. well, but do you get exception? Otherwise I think you want to add this comment to bug 181644. > > Here is my template: > > $oTable = new Table(); > $oTable->sTableStyle = ""; > $oTable->sTableClass = ""; > $oTable->iBorder = ; > $oTable->iCellPadding = ; > $oTable->iCellSpacing = ; > $oTable->Cell(); > > here is the result from typing table and pressing tab: > > $oTable = new Table(); > $oTable->sTableStyle = ""; > $oTable->sTableClass = ""; > $oTable->iBorder = ; > $oTable->iCellPadding = ; > $oTable->iCellSpacing = ; > $oTable->Cell();
Integrated into 'main-golden', will be available in build *201003120200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/cfe17d9e0214 User: Petr Pisl <ppisl@netbeans.org> Log: #181588 - [69cat] Exception on Template or AutoComplete Use
Sorry, yes, that comment was meant for 181644. Something keeps happening so that when I press Commit on this page, it changes to a different bug ID after it submits and I don't always realize that has happened. Why is bugzilla doing that?
I don't know what's causing this but our Bugzilla is surely not in a good condition these days. Very slow or timing out connections very often. :-(
(In reply to comment #14) > Sorry, yes, that comment was meant for 181644. Something keeps happening so > that when I press Commit on this page, it changes to a different bug ID after > it submits and I don't always realize that has happened. Why is bugzilla doing > that? because it goes to the next by default. you can change you preferences in bugzilla on the top of the page under find button so if you can't reproduce this exception I consider this as verified. thanks.