Bug 49950

Summary: Proxy : IndexOutOfBoundsException when recording with Proxy server
Product: JMeter - Now in Github Reporter: jens_0
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: jens_0, p.mouawad
Priority: P2    
Version: 2.5.1   
Target Milestone: ---   
Hardware: All   
OS: All   

Description jens_0 2010-09-17 08:37:30 UTC
Hi,

when recording with the proxy server, at irregular intervals I get the following kind of exception:

(The numbers for Index and Size vary)

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 1, Size: 4
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.get(ArrayList.java:322)
	at org.apache.jorphan.gui.ObjectTableModel.getValueAt(ObjectTableModel.java:165)
	at javax.swing.JTable.getValueAt(JTable.java:2686)
	at javax.swing.JTable.prepareRenderer(JTable.java:5703)
	at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
	at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
	at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
	at javax.swing.JComponent.paintComponent(JComponent.java:752)
	at javax.swing.JComponent.paint(JComponent.java:1029)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1479)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1410)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:294)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1224)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:785)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 jens_0 2011-01-10 05:45:18 UTC
This can be reproduced if, while recording, selecting a row in a recently recorded http sampler's parameter table and than performing another http action.

That's the table the ObjectTableModel that creates the exception is linked to.

Except from the exception appearing in the console output, I don't see any other problems.
Comment 2 Philippe Mouawad 2011-09-18 21:14:25 UTC
Hello,
Can you make screenshots of your bug scenario ?
I am not sure to understand:
"selecting a row in a recently recorded http sampler's parameter table and than performing another http action."

Thank you
Regards
Comment 3 Philippe Mouawad 2011-10-31 11:39:15 UTC
Scenario is the following:
- Configure Proxy and Recording Controller
- Start recording gmail for example
- Click on gmail link and while it is loading, select a node under Recording Controller you will get this exception in logs:

2011/10/31 12:28:58 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.IndexOutOfBoundsException: Index: 5, Size: 5
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.get(ArrayList.java:322)
	at org.apache.jorphan.gui.ObjectTableModel.getValueAt(ObjectTableModel.java:185)
	at javax.swing.JTable.getValueAt(JTable.java:2686)
	at javax.swing.JTable.prepareRenderer(JTable.java:5703)
	at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
	at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
	at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:153)
	at javax.swing.JComponent.paintComponent(JComponent.java:752)
	at javax.swing.JComponent.paint(JComponent.java:1029)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5098)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:811)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:677)
	at java.awt.EventQueue.access$000(EventQueue.java:85)
	at java.awt.EventQueue$1.run(EventQueue.java:638)
	at java.awt.EventQueue$1.run(EventQueue.java:636)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:647)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 4 Philippe Mouawad 2011-10-31 12:13:24 UTC
Also noticed:
2011/10/31 13:07:24 ERROR - jmeter.JMeter: Uncaught exception:  java.util.ConcurrentModificationException
	at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
	at java.util.AbstractList$Itr.next(AbstractList.java:343)
	at org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel.getUnclonedParameters(HTTPArgumentsPanel.java:113)
	at org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel.createTestElement(HTTPArgumentsPanel.java:92)
	at org.apache.jmeter.protocol.http.config.gui.UrlConfigGui.modifyTestElement(UrlConfigGui.java:198)
	at org.apache.jmeter.protocol.http.config.gui.MultipartUrlConfigGui.modifyTestElement(MultipartUrlConfigGui.java:60)
	at org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui.modifyTestElement(HttpTestSampleGui.java:115)
	at org.apache.jmeter.gui.tree.JMeterTreeModel.addComponent(JMeterTreeModel.java:132)
	at org.apache.jmeter.protocol.http.proxy.ProxyControl.placeSampler(ProxyControl.java:805)
	at org.apache.jmeter.protocol.http.proxy.ProxyControl.deliverSampler(ProxyControl.java:409)
	at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:296)
Comment 5 Philippe Mouawad 2011-10-31 12:13:54 UTC
All these issues are due to update of TableModel from other threads than AWT Thread.
Comment 6 Philippe Mouawad 2011-12-30 12:40:38 UTC
Date: Fri Dec 30 12:31:53 2011
New Revision: 1225816

URL: http://svn.apache.org/viewvc?rev=1225816&view=rev
Log:
Bug 49950 - Proxy : IndexOutOfBoundsException when recording with Proxy server

Modified:
   jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
   jmeter/trunk/xdocs/changes.xml
Comment 7 The ASF infrastructure team 2022-09-24 20:37:45 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2399