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: | "com.sun.java.swing.plaf.gtk.GTKLookAndFeel/icons/Error.gif not found." in console | ||
---|---|---|---|
Product: | platform | Reporter: | Jesse Glick <jglick> |
Component: | Window System | Assignee: | Martin Krauskopf <mkrauskopf> |
Status: | CLOSED WONTFIX | ||
Severity: | blocker | CC: | dsimonek, tboudreau |
Priority: | P4 | Keywords: | GTK |
Version: | 4.x | ||
Hardware: | PC | ||
OS: | Linux | ||
URL: | http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5053844 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | NbPresenter-patch |
Description
Jesse Glick
2004-06-07 20:25:31 UTC
I think this is actually the form editor making some assumptions - I've seen a few of these, and it looks like it assumes there will be a bunch of icons there for random things, with similar names across different look and feels. OK, so I'm passing to Tim and ccing form guys. I *think* this bug belongs to the form editor - no code I know if in core/openide asks for these icons, and I believe I've seen code that does in the form editor, though I forgot what for. Really? I see this message frequently, and I don't use the form editor often. Just that one or the whole laundry list (15-20 not found images)? Just this one. Just saw a message about Inform.gif: <<.....>> <<some informational stack traces, to log file only>> com.sun.java.swing.plaf.gtk.GTKLookAndFeel/icons/Inform.gif not found. *********** Exception occurred ************ at 2:10 PM on Jun 27, 2004 <<stack trace that was shown in a dialog>> com.sun.java.swing.plaf.gtk.GTKLookAndFeel/icons/Error.gif not found. <<end of messages.log>> On restart with a form open, I get 15-20 of these - "harddrive.gif", etc. The messages produced by form were caused by an incorrect resolution of some UIDefaults' lazy values. For example the key "OptionPane.errorIcon" maps to a lazy value that (when resolved) attempts to load Error.gif file from its look and feel. Unfortunately GTKLookAndFeel doesn't provide this icon and the key is there because it is added by its superclass BasicLookAndFeel. We fixed the incorrect resolution in form module, but there seem to be another places where we directly or undirectly resolve those icons (e.g. in exception dialog) => reassigning back to core. Passing back to Tim. Passing to Martin. I think that the reason is that all LookAndFeels except GTKLookAndFeel use SwingUtilities2.makeIcon(..., "icons/*.gif") to fill up values into an UIDefaults. GTKLookAndFeel use its own mechanism (see GTKStyle class: e.g. new GTKStockIcon("gtk-dialog-question", 6)). So when we use BasicOptionPaneUI in NbPresenter it will probably tries to wrongly use "icons/*.gif" (which works for all others LookAndFeels). It is all surely more intricated, e.g. there are OptionPaneUIs for all L&F except, again, GTK. So GTK L&F probably works little differently due to multiple Themes. Maybe that someone will want to continue in investigation of this issue (or I will later). So the easiest way is probably conditionally use own BasicOptionPaneUI when GTK is not used (see attached patch) which makes GTK dialogs a little ugly. But there could be a better solution. It also seems that this problem is on more places that just this case. No perfect solution, not fixed on all places - leaving open. Any hints and comments welcome :) Created attachment 20728 [details]
NbPresenter-patch
The JDK team has been very good about fixing stuff like this (UIManager issues, etc.). Recommend filing a bug with them (we'll still need a patch and a null check, but whether they like it or not, this stuff is de- facto API). I found already filled bug which could solve our problem as well (jdk bug 4989521). Even UIManager.getIcon("OptionPane.errorIcon"); doesn't work when GKTLookAndFeel is in use. Cool. Fixed in b48. It is not worth to workaround it for <b48 IMO. Verified |