Bug 45465 - Randomly ArrayIndexOutOfBounds exceptions at startup when using LogFactory
Summary: Randomly ArrayIndexOutOfBounds exceptions at startup when using LogFactory
Status: RESOLVED WONTFIX
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.2
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 08:34 UTC by Sébastien Launay
Modified: 2008-07-23 10:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Launay 2008-07-23 08:34:50 UTC
I got random ArrayIndexOutOfBounds exceptions when starting my webapp from Eclipse 3.4 and by using log4j 1.2.13.
This is the stack trace i have:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
        at java.util.Vector.elementAt(Vector.java:432)
        at javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTreeNode.java:230)
        at javax.swing.tree.VariableHeightLayoutCache.treeNodesChanged(VariableHeightLayoutCache.java:412)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesChanged(BasicTreeUI.java:3671)
        at javax.swing.tree.DefaultTreeModel.fireTreeNodesChanged(DefaultTreeModel.java:466)
        at javax.swing.tree.DefaultTreeModel.nodesChanged(DefaultTreeModel.java:328)
        at javax.swing.tree.DefaultTreeModel.nodeChanged(DefaultTreeModel.java:261)
        at org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerModel$1.run(CategoryExplorerModel.java:324)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        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)

From what i have searched, this can be caused by different threads accessing the same data at the same time.

This is not a major issue but it's kind of irritating because Eclipse debugger get the focus and i need to resume the thread each time.
Comment 1 Curt Arnold 2008-07-23 10:49:07 UTC
LogFactor5 is long abandoned in favor of Chainsaw and Chainsaw has been spun off as an independent project so the version inside of log4j.jar should not be used.  If you have a patch, we could consider applying it, but can't see spending the effort to try to research the problem at this point.