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.
Summary: | [NIMBUS] NPE at sun.font.FontDesignMetrics$MetricsKey.init | ||
---|---|---|---|
Product: | guibuilder | Reporter: | lhochet <lhochet> |
Component: | Code | Assignee: | issues@guibuilder <issues> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | mslama |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=37021 | ||
Issue Type: | DEFECT | Exception Reporter: | 37021 |
Bug Depends on: | |||
Bug Blocks: | 120656 | ||
Attachments: |
stacktrace
Flash movie of the steps used to reproduce the issue |
Description
lhochet
2008-03-15 16:19:03 UTC
Created attachment 58431 [details]
stacktrace
what JDK are you using? Is it jdk1.6.0_11? VM: Java HotSpot(TM) Client VM, 11.0-b11 I'm using JDK 1.6.0 u10 beta b13 Please can you send me panel (minimum project) I can use to reproduce this? I can reproduce it by creating a new Java Desktop Application project (leaving all defaults), then right clicking on [FrameView] for the DesktopApplication1View that opened automatically, then "Preview Design"|Nimbus, then in the preview I click on File, then on the File menu, I move the mouse of Exit, and I have the exception moving opened issues from TM <= 6.1 to TM=Dev I cannot reproduce this issue with latest JDK 6u10 b22. Please test again. But there is different issue I am investigating now. Problem is when opening Properties window. Issue filed as #133852. Netbeans 6.1 RC2 with JDK 6u10 b22: no change, I can still reproduce the issue I tried both with trunk build and 6.1 and no exception with JDK 6u10 b22. Please use trunk build with Nimbus L&F. NB 6.1 does not support it. I just fixed #133852 hopefully it will get into main and tomorrow daily trunk build. I pushed fix to core-main. I am not able to reproduce with given steps even on Vista 32bit and JDK 6u10 b22, latest trunk build. Please give steps to reproduce this issue. Otherwise it looks like specific to your configuration. (Different fonts,.... no idea what could cause it.) Exception comes from TabbedPaneUI so it looks like you have JTabbedPane somewhere. And eventually with non default font. If you run JTabbedPane demo do you have the same exception? *** Issue 134821 has been marked as a duplicate of this issue. *** Created attachment 61227 [details]
Flash movie of the steps used to reproduce the issue
I don't see what you mean by the "JTabbedPane demo"? From the look of it there is no JTabbedPane in the default desktop application however. In order to check if this was specific to my system I've reproduced the steps on a VM copy of Vista SP1 + JDK 1.6.0_10 b23 + NetBeans Dev Build 200805101202, the issue also occurs there (see the flash attachement), Vista is a stock Vista using the basic L&F due to a short amount of RAM available to the VM (1Gb), on my proper system, it run the full Aero L&F (with a 1680x1050 resolution). I have also reproduced it on XP SP2 (physical machine)+ JDK 1.6.0_10 b23 + NetBeans Dev Build 200805101202 (see Issue 134821). I see it now. It does not work even on Linux (#134846, #134868). 2 important things to reproduce not clearly said: 1.IDE itself runs in default L&F ie. NOT Nimbus so preview is run in different L&F. 2.[FrameView] node is in *Inspector* window. But I invoked preview using icon Preview Design from editor toolbar. Passing to from if problem is on our side or if it is JDK/Swing issue. Correction: Referenced issues are issue #134846 and issue #134848. The problem was caused by missing "defaultFont" key in UIDefaults. This key is needed by many UI delegates in Nimbus look and feel. Unfortunately, there are some places not covered by our preview blocks that needs this key. Happily, it seems that this key is not used by anyone else and it is possible to add it without any consequences into IDE defaults. So, it should be fixed by now. Modified file: http://hg.netbeans.org/main/rev/19e15af84fe2 For Nimbus L&F I am now working on change of font size. I was told by Nimbus team to modify defaultFont so on Nimbus this key is used. Unfortunately modifying this key does not have desired effect on font size. > I was told by Nimbus team to modify defaultFont so on Nimbus this key is used.
That should be fine, we don't do the mentioned changes when the IDE is running on Nimbus look and feel. The problem was
that there were no value for "defaultFont" key in UIManager when running the IDE on other look and feels. So, if the
IDE is running on Nimbus then we (=preview, not you=the rest of the IDE) obtain an inaccurate value in the worst case -
still much better then throwing an exception.
> I see it now. It does not work even on Linux (#134846, #134868). 2 important things to reproduce not clearly said:
Apologies, I'll try to be more precise next time
|