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 199959 - NullPointerException at org.netbeans.modules.editor.lib2.highlighting.CompoundAttributes.getAttribute
Summary: NullPointerException at org.netbeans.modules.editor.lib2.highlighting.Compoun...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 22:11 UTC by rozwell
Modified: 2011-07-14 14:28 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 179729


Attachments
stacktrace (6.13 KB, text/plain)
2011-07-07 22:11 UTC, rozwell
Details
stacktrace (6.05 KB, text/plain)
2011-07-10 23:10 UTC, rozwell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rozwell 2011-07-07 22:11:15 UTC
Build: NetBeans IDE Dev (Build 201107050600)
VM: Java HotSpot(TM) 64-Bit Server VM, 19.1-b02, Java(TM) SE Runtime Environment, 1.6.0_24-b07
OS: Linux

User Comments:
GUEST: autocompleting

GUEST: PHP: tried to accept a code-completed suggestion for overriding a parent method in a sub-class

GUEST: using an editor code template by typing the abbreviation and pressing TAB

rozwell: typed:
public function get
then used autocompletion and after selecting a method, error occured




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.editor.lib2.highlighting.CompoundAttributes.getAttribute(CompoundAttributes.java:117)
   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 rozwell 2011-07-07 22:11:20 UTC
Created attachment 109305 [details]
stacktrace
Comment 2 rozwell 2011-07-10 23:10:47 UTC
Created attachment 109354 [details]
stacktrace

changing method name to the one from autocompletion
Comment 3 Miloslav Metelka 2011-07-12 21:42:35 UTC
I have added an assertion for the way the CompoundAttributes are created (to diagnose the problem) so this error will not be thrown anymore (instead an assertion would be thrown). Therefore closing this issue as fixed.

http://hg.netbeans.org/jet-main/rev/54c68bde9569
Comment 4 Quality Engineering 2011-07-14 14:28:24 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/54c68bde9569
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #199959 - NullPointerException at org.netbeans.modules.editor.lib2.highlighting.CompoundAttributes.getAttribute - assertion added to CompoundAttributes creation.