This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours

Bug 712211

Summary: Null Pointer Exception in SwingUtilities2
Product: [Fedora] Fedora Reporter: Kyle J. Harms <kyle.harms>
Component: java-1.6.0-openjdkAssignee: Denis Lila <dlila>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: ahughes, dbhole, jon.vanalten, jvanek, lkundrak, mark, mmatejov, omajid
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-26 02:18:20 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Kyle J. Harms 2011-06-09 15:39:06 EDT
Description of problem:
Java applications (For example: Alice) with empty swing popup menus crash because of a null pointer exception in SwingUtilities2.

Version-Release number of selected component (if applicable):
$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (fedora-
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

How reproducible:
Use test program:

Actual results:
	at sun.swing.SwingUtilities2.getLeftSideBearing(
	at sun.swing.MenuItemLayoutHelper.getLeftExtraWidth(
	at sun.swing.MenuItemLayoutHelper.calcExtraWidths(
	at sun.swing.MenuItemLayoutHelper.reset(
	at javax.swing.plaf.synth.SynthMenuItemLayoutHelper.<init>(
	at javax.swing.plaf.synth.SynthGraphicsUtils.getPreferredMenuItemSize(
	at javax.swing.plaf.synth.SynthMenuItemUI.getPreferredMenuItemSize(
	at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(
	at javax.swing.JComponent.getPreferredSize(
	at javax.swing.BoxLayout.checkRequests(
	at javax.swing.BoxLayout.preferredLayoutSize(
	at javax.swing.plaf.synth.DefaultMenuLayout.preferredLayoutSize(
	at java.awt.Container.preferredSize(
	at java.awt.Container.getPreferredSize(
	at javax.swing.JComponent.getPreferredSize(
	at javax.swing.JPopupMenu.adjustPopupLocationToFitScreen(
	at javax.swing.JPopupMenu.getPopup(
	at javax.swing.JPopupMenu.setVisible(

Expected results:
No exception. No crash.

Additional info:
jdk7 bug:
jdk7 fix:
Comment 1 Denis Lila 2011-06-10 11:43:41 EDT
Hi Kyle.

Thank you very much for finding the changeset that fixes this (in jdk7). I will test it out and backport it.
Comment 2 Kyle J. Harms 2011-06-17 13:19:03 EDT
I reported the wrong bug for openjdk for this:
Comment 3 Denis Lila 2011-06-17 13:26:05 EDT
That makes sense. The first bug description didn't seem very related.

Either way, the changeset link you posted does fix the problem, and I've backported it. The fix should be in the next update of icedtea6-1.10.