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 - NullPointerException at org.netbeans.modules.editor.lib2.highlighting.CompoundAttributes.getAttribute
Summary: NullPointerException at org.netbeans.modules.editor.lib2.highlighting.Compoun...
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: TEST
: 201206 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-08 06:39 UTC by Jiri Skrivanek
Modified: 2011-09-14 10:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 180457


Attachments
stacktrace (5.64 KB, text/plain)
2011-08-08 06:39 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
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)