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 201294 - NullPointerException at sun.font.FontDesignMetrics$MetricsKey.init
Summary: NullPointerException at sun.font.FontDesignMetrics$MetricsKey.init
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.1
Hardware: All All
: P1 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-24 16:53 UTC by mklaehn
Modified: 2011-09-23 12:05 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 180744


Attachments
stacktrace (6.38 KB, text/plain)
2011-08-24 16:53 UTC, mklaehn
Details
stacktrace (6.44 KB, text/plain)
2011-09-07 17:23 UTC, tim_sa
Details
stacktrace (6.44 KB, text/plain)
2011-09-07 17:29 UTC, tim_sa
Details
stacktrace (2.87 KB, text/plain)
2011-09-12 22:54 UTC, mbien
Details
stacktrace (6.38 KB, text/plain)
2011-09-20 00:30 UTC, sunbiz
Details
stacktrace (6.38 KB, text/plain)
2011-09-21 10:07 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mklaehn 2011-08-24 16:53:24 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-7737-on-20110821)
VM: Java HotSpot(TM) Server VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03
OS: Windows XP

User Comments:
mklaehn: opening groovy file




Stacktrace: 
java.lang.NullPointerException
   at sun.font.FontDesignMetrics$MetricsKey.init(FontDesignMetrics.java:199)
   at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:267)
   at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:942)
   at javax.swing.JComponent.getFontMetrics(JComponent.java:1599)
   at org.netbeans.editor.FontMetricsCache.getFontMetrics(FontMetricsCache.java:77)
   at org.netbeans.editor.EditorUI.computeLineNumberDigitWidth(EditorUI.java:1516)
Comment 1 mklaehn 2011-08-24 16:53:28 UTC
Created attachment 110188 [details]
stacktrace
Comment 2 MackSix 2011-08-30 04:45:33 UTC
I have the same problem with:

Product Version: NetBeans IDE Dev (Build 201108290601)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 3 Exceptions Reporter 2011-09-06 16:35:04 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=180744
Comment 4 tim_sa 2011-09-07 17:23:12 UTC
Created attachment 110492 [details]
stacktrace

opened a .groovy file
Comment 5 tim_sa 2011-09-07 17:29:13 UTC
Created attachment 110493 [details]
stacktrace
Comment 6 Milutin Kristofic 2011-09-08 08:27:14 UTC
groovy team, please have a look at this one.
Comment 7 mbien 2011-09-12 22:54:01 UTC
Created attachment 110679 [details]
stacktrace

NPE when opening a self written (OpenCL) editor in latest 7.1 devbuild. This did not happen on 7.01. Stacktrace does not contain module code.
Comment 8 sunbiz 2011-09-20 00:30:59 UTC
Created attachment 110892 [details]
stacktrace

Opening a groovy file from the project threw this exception
Comment 9 Petr Jiricka 2011-09-21 10:07:05 UTC
Milo, this is coming from your code, any ideas?
Comment 10 Petr Jiricka 2011-09-21 10:07:07 UTC
Created attachment 110957 [details]
stacktrace

Opening a groovy file.
Comment 11 Miloslav Metelka 2011-09-21 12:55:25 UTC
It's a JDK issue http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6547087
We should check whether it implies that c.getFont() == null in this case.
Comment 12 Milutin Kristofic 2011-09-21 15:52:51 UTC
http://hg.netbeans.org/jet-main/rev/a012e0f8c7db
Comment 13 Quality Engineering 2011-09-22 14:55:02 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a012e0f8c7db
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #201294 - NullPointerException at sun.font.FontDesignMetrics$MetricsKey.init
Comment 14 Milutin Kristofic 2011-09-23 10:45:41 UTC
It's already in releases71_beta: http://hg.netbeans.org/releases/rev/95082ea602f8
Comment 15 Jiri Prox 2011-09-23 12:05:36 UTC
verified in beta