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 200744

Summary: NullPointerException at org.netbeans.modules.editor.lib2.highlighting.CompoundAttributes.getAttribute
Product: editor Reporter: Jiri Skrivanek <jskrivanek>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: VERIFIED FIXED    
Severity: normal CC: vriha
Priority: P2 Keywords: TEST
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 180457
Attachments: stacktrace

Description Jiri Skrivanek 2011-08-08 06:39:27 UTC
Build: NetBeans IDE Dev (Build 201108060600)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows XP

User Comments:
jskrivanek: To reproduce:
- create PHP application project from template
- modify index.php to contain the following (leading spaces are importamt):
<?php
  class
?>
- reformat code (Alt+Shift+F) and exception is thrown




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.editor.lib2.highlighting.CompoundAttributes.getAttribute(CompoundAttributes.java:118)
   at org.netbeans.modules.editor.lib2.view.ViewUtils.getFont(ViewUtils.java:162)
   at org.netbeans.modules.editor.lib2.view.DocumentView.createTextLayout(DocumentView.java:1662)
   at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.fixSpansAndRepaint(ParagraphViewChildren.java:307)
   at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.ensureIndexMeasured(ParagraphViewChildren.java:237)
   at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.modelToViewChecked(ParagraphViewChildren.java:469)
Comment 1 Jiri Skrivanek 2011-08-08 06:39:31 UTC
Created attachment 109842 [details]
stacktrace
Comment 2 Jiri Skrivanek 2011-08-08 06:47:10 UTC
See bug 199959.
Comment 3 Jiri Skrivanek 2011-08-17 08:38:06 UTC
Increasing priority because it blocks PHP validation tests.
Comment 4 Miloslav Metelka 2011-09-13 12:48:22 UTC
http://hg.netbeans.org/jet-main/rev/0c2bdac71a9f
Comment 5 Miloslav Metelka 2011-09-13 12:51:09 UTC
*** Bug 201206 has been marked as a duplicate of this bug. ***
Comment 6 Quality Engineering 2011-09-14 06:23:31 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/0c2bdac71a9f
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #200744 - NullPointerException at org.netbeans.modules.editor.lib2.highlighting.CompoundAttributes.getAttribute().
Comment 7 Vladimir Riha 2011-09-14 10:05:41 UTC
Verified, I tried to reproduce it following the steps from description and from #201206 and it works fine


Product Version: NetBeans IDE Dev (Build jet-main-4611-on-20110914)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)