Project

General

Profile

Actions

Bug #5501

closed

Got an java.lang.NullPointerException when click any menu after downloading a kar file

Added by Jing Tao over 12 years ago. Updated over 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
core
Target version:
Start date:
10/03/2011
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5501

Description

After decompress the linux kepler-2.3 installer, I started kepler by running ./kepler.sh.

Then I searched the kepler library and found a kar file windChill. I downloaded the kar file and wanted to open it. However, when i clicked file menu and got the error:
[null] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
[null] at com.sun.java.swing.plaf.gtk.GTKIconFactory$MenuArrowIcon.paintIcon(GTKIconFactory.java:340)
[null] at sun.swing.plaf.synth.SynthIcon.paintIcon(SynthIcon.java:104)
[null] at com.jgoodies.looks.common.MinimumSizedIcon.paintIcon(MinimumSizedIcon.java:80)
[null] at com.jgoodies.looks.common.MenuItemRenderer.paintMenuItem(MenuItemRenderer.java:419)
[null] at com.jgoodies.looks.common.ExtBasicMenuUI.paintMenuItem(ExtBasicMenuUI.java:135)
[null] at com.jgoodies.looks.plastic.PlasticMenuUI.paintMenuItem(PlasticMenuUI.java:80)
[null] at javax.swing.plaf.basic.BasicMenuItemUI.paint(BasicMenuItemUI.java:471)
[null] at javax.swing.plaf.basic.BasicMenuItemUI.update(BasicMenuItemUI.java:467)
[null] at javax.swing.JComponent.paintComponent(JComponent.java:765)
[null] at javax.swing.JComponent.paint(JComponent.java:1029)
[null] at javax.swing.JComponent.paintChildren(JComponent.java:866)
[null] at javax.swing.JComponent.paint(JComponent.java:1038)
[null] at javax.swing.JComponent.paintChildren(JComponent.java:866)
[null] at javax.swing.JComponent.paint(JComponent.java:1038)
[null] at javax.swing.JComponent.paintChildren(JComponent.java:866)
[null] at javax.swing.JComponent.paint(JComponent.java:1038)
[null] at javax.swing.JLayeredPane.paint(JLayeredPane.java:581)
[null] at javax.swing.JComponent.paintChildren(JComponent.java:866)
[null] at javax.swing.JComponent.paint(JComponent.java:1038)
[null] at javax.swing.JComponent.paintToOffscreen(JComponent.java:5138)
[null] at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:302)
[null] at javax.swing.RepaintManager.paint(RepaintManager.java:1145)
[null] at javax.swing.JComponent._paintImmediately(JComponent.java:5086)
[null] at javax.swing.JComponent.paintImmediately(JComponent.java:4896)
[null] at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:740)
[null] at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:696)
[null] at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:676)
[null] at javax.swing.RepaintManager.access$700(RepaintManager.java:57)
[null] at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1550)
[null] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
[null] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)
[null] at java.awt.EventQueue.access$000(EventQueue.java:96)
[null] at java.awt.EventQueue$1.run(EventQueue.java:608)
[null] at java.awt.EventQueue$1.run(EventQueue.java:606)
[null] at java.security.AccessController.doPrivileged(Native Method)
[null] at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
[null] at java.awt.EventQueue.dispatchEvent(EventQueue.java:617)
[null] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
[null] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
[null] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
[null] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
[null] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
[null] at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

I doubled checked the MyWorkflow folder, and found that windChill.kar is there.

Then i quited the kepler and started it again. This time i can open and run the windChill.kar successfully.


Files

ubuntu_default_lnf.png (114 KB) ubuntu_default_lnf.png Derik Barseghian, 11/08/2011 06:12 PM
Actions #2

Updated by Derik Barseghian over 12 years ago

This is related to our using JGoodies Looks (LnF_looks-1.3.2.jar) for our linux LnF. On Ubuntu 10.04 if you use the native (gnome i guess?) LnF, I can't get the bug to occur.

uiSettings.xml:
<name>LINUX_LNF</name
<value>com.jgoodies.looks.plastic.Plastic3DLookAndFeel</value>

In the LOOK & FEEL section in uiSettings.xml there's a comment: # NOTE - Typically won't need to (and shouldn't) change LnF for Windows or # Mac OS X - we should use the native LnF's on these systems # # Primarily intended for Linux, since Sun's standard Look & Feel for linux # doesn't really match the newer linuxes (linices??), and has big ol' honking # fonts that don't fit on our dainty buttons.

I guess something is going wrong when you do a remote search, because the returned results appear with a background color, which is what the component library looks like when using the default Ubuntu LnF (i.e. when I set blank the LINUX_LNF value in uiSettings.xml).

I tried changing to the newest JGoodies Looks (2.4.2 (jgoodies-common-1.2.1.jar and jgoodies-looks-2.4.2.jar)), but a similar, and additional errors occurred.

As mentioned, when I just use my standard LnF, I can't get the error to occur. I also can't find any buttons where text doesn't fit, which the comment gives as the reason for using a specific LnF. Kepler looks fine for the most part, but there are a few issues: the background color on items in the components library, there's a gap between the zoom-out and play buttons in the toolbar, and some of the drop-down menu backgrounds are the same color as other backgrounds, and thus blend in. See attached screenshot.

Actions #3

Updated by Derik Barseghian over 12 years ago

Another bug that seems to fairly consistently happen after your first remote Component search is that after clicking on it, the Cancel button loses its text.

Actions #4

Updated by Derik Barseghian over 12 years ago

Strangely my stacktrace has different line numbers than Jing's, and googling my numbers yield more results. Unfortunately I haven't found a quick fix.

[run] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
[run] at com.sun.java.swing.plaf.gtk.GTKIconFactory$MenuArrowIcon.paintIcon(GTKIconFactory.java:348)
[run] at sun.swing.plaf.synth.SynthIcon.paintIcon(SynthIcon.java:87)
[run] at com.jgoodies.looks.common.MinimumSizedIcon.paintIcon(MinimumSizedIcon.java:80)
[run] at com.jgoodies.looks.common.MenuItemRenderer.paintMenuItem(MenuItemRenderer.java:419)
[run] at com.jgoodies.looks.common.ExtBasicMenuUI.paintMenuItem(ExtBasicMenuUI.java:135)
[run] at com.jgoodies.looks.plastic.PlasticMenuUI.paintMenuItem(PlasticMenuUI.java:80)
[run] at javax.swing.plaf.basic.BasicMenuItemUI.paint(BasicMenuItemUI.java:587)
[run] at javax.swing.plaf.basic.BasicMenuItemUI.update(BasicMenuItemUI.java:583)
[run] at javax.swing.JComponent.paintComponent(JComponent.java:758)
[run] at javax.swing.JComponent.paint(JComponent.java:1022)
[run] at javax.swing.JComponent.paintToOffscreen(JComponent.java:5104)
[run] at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
[run] at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
[run] at javax.swing.JComponent._paintImmediately(JComponent.java:5052)
[run] at javax.swing.JComponent.paintImmediately(JComponent.java:4862)
[run] at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723)
[run] at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
[run] at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
[run] at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
[run] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
[run] at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
[run] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
[run] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
[run] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
[run] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
[run] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
[run] at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Actions #5

Updated by Derik Barseghian over 12 years ago

No objections (http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-dev/2011-November/019957.html ) so I've committed the change at r28981 and r28982 and to use default LnF on linux, which avoids this bug.
The Cancel button issue in comment#3 also goes away.
Closing.

Actions #6

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 5501

Actions

Also available in: Atom PDF