JDK-5107980 : REGRESSION: REGRESSION: GridBagLayout restricted to 512 rows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: x86
  • Submitted: 2004-09-28
  • Updated: 2004-10-18
  • Resolved: 2004-10-01
Related Reports
Duplicate :  
Description
Name: js151677			Date: 09/28/2004


FULL PRODUCT VERSION :
java version "1.5.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Linux linux-dvc 2.4.20-64GB-SMP #1 SMP Mon Mar 17 17:56:03 UTC 2003 i686 unknown unknown GNU/Linux


A DESCRIPTION OF THE PROBLEM :
GridBagLayouts are restrcited to 512 rows/cols.  If you try to add more you get an ArrayIndexOutOfBoundsException.

This bug has already been reported (see bug 4254022).

We thought it was fixed because it was working fine in build 1.5.0-beta-b32c.  However, it is NOT working in this Release Candidate so we decided to report it as a new bug against the release candidate because it seems like there has been a regression.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Add more than 512 rows to a GridBagLayout.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No errors.
ACTUAL -
ArrayIndexOutOfBoundsException

ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.ArrayIndexOutOfBoundsException: 512
	at java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:906)
	at java.awt.GridBagLayout.getLayoutInfo(GridBagLayout.java:816)
	at java.awt.GridBagLayout.preferredLayoutSize(GridBagLayout.java:636)
	at java.awt.Container.preferredSize(Container.java:1558)
	at java.awt.Container.getPreferredSize(Container.java:1543)
	at javax.swing.JComponent.getPreferredSize(JComponent.java:1584)
	at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
	at java.awt.Container.layout(Container.java:1401)
	at java.awt.Container.doLayout(Container.java:1390)
	at java.awt.Container.validateTree(Container.java:1473)
	at java.awt.Container.validate(Container.java:1448)
	at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
	at java.awt.Dialog$1.run(Dialog.java:515)
	at java.awt.Dialog.show(Dialog.java:536)
	at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:843)
	at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:645)
	at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:616)
	at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:587)
	at arbchart.GUIErrorHandler.handle(GUIErrorHandler.java:7)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at java.awt.EventDispatchThread.handleException(EventDispatchThread.java:347)
	at java.awt.EventDispatchThread.processException(EventDispatchThread.java:253)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:245)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.ArrayIndexOutOfBoundsException: 512
java.lang.ArrayIndexOutOfBoundsException: 512
	at java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:906)
	at java.awt.GridBagLayout.getLayoutInfo(GridBagLayout.java:816)
	at java.awt.GridBagLayout.preferredLayoutSize(GridBagLayout.java:636)
	at java.awt.Container.preferredSize(Container.java:1558)
	at java.awt.Container.getPreferredSize(Container.java:1543)
	at javax.swing.JComponent.getPreferredSize(JComponent.java:1584)
	at javax.swing.JViewport.getViewSize(JViewport.java:1003)
	at javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport(BasicScrollPaneUI.java:264)
	at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.viewportStateChanged(BasicScrollPaneUI.java:855)
	at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:797)
	at javax.swing.JViewport.fireStateChanged(JViewport.java:1357)
	at javax.swing.JViewport.setView(JViewport.java:975)
	at arbchart.ChartFrame.showChart(ChartFrame.java:2233)
	at arbchart.ChartFrame$LoadWorker.finished(ChartFrame.java:4690)
	at arbchart.SwingWorker$1.run(SwingWorker.java:125)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.ArrayIndexOutOfBoundsException: 512


REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : tiger-beta2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Incident Review ID: 315615) 
======================================================================

Comments
EVALUATION Fix for 4254022 was back outed because of regressions it introduced. So, 4254022 is not fixed yet and this is its duplicate. ###@###.### 2004-10-01
2004-10-01