Hi,
I'm working on jEdit 5.2 with java 1.8.0_40 on Windows 7.
I have the following plugin installed:
Beauty 0.7.0
BufferTabs 1.2.4
Common Controls 1.7.4
Console 5.1.4
EclipseIcons 1.0
ErrorList 2.3
FTP 1.1
Highlight 2.0
JDiff Plugin 3.3.0
Log Viewer 0.8
QuickNotepad 5.0
SideKick 1.7
TextTools 1.15
WhiteSpace 1.0.2
XercesPlugin 2.11.0
XML 2.8.7
XSLT 0.8.2
During normal work, like typing or reading text file I got this exception recursively:
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 48
at org.gjt.sp.jedit.textarea.ChunkCache.updateChunksUpTo(ChunkCache.java:641)
at org.gjt.sp.jedit.textarea.ChunkCache.getLineInfo(ChunkCache.java:264)
at org.gjt.sp.jedit.textarea.ExtensionManager.paintScreenLineRange(ExtensionManager.java:104)
at org.gjt.sp.jedit.textarea.TextAreaPainter.paint(TextAreaPainter.java:895)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1300(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Bye Mirko
Do you have steps to reproduce this?
Not exactly, but I have noticed that if I use jEdit in full screen (Maximized) and I click around I get errors on any click.
If jEdit is non Maximized the exception don't come out.
Some more information. This issue appere when I switch from the docking station with an
attached monitor to directly work on the laptop.
If I use the laptop in normal mode I don't have this error.
Ok. You're using Windows 7. What laptop or graphics card is it? I guess that may be all we need to reproduce it.
It si a HP ProBook 6470b
Lately I've been seeing this fairly often. I also don't have steps to reproduce, but I'm on Linux, my laptop is on a docking station with an attached monitor, but my laptop hasn't been off of the docking station in months. Things get wonky in the text area when this starts, like lines not getting painted, extra blank lines appearing then disappearing. I'm looking into the problem, but I'm not that familiar with this part of the code, so I'm hesitant to assign this ticket to myself. Oddly enough, the problem appears when I'm looking at ChunkCache.java itself, which appears to be the source of the problem. The stack trace I'm seeing starts like this:
Error repainting line range {0,39}:
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 39
at org.gjt.sp.jedit.textarea.ChunkCache.updateChunksUpTo(ChunkCache.java:641)
at org.gjt.sp.jedit.textarea.ChunkCache.getLineInfo(ChunkCache.java:264)
at org.gjt.sp.jedit.textarea.ExtensionManager.paintScreenLineRange(ExtensionManager.java:105)
at org.gjt.sp.jedit.textarea.Gutter.paintComponent(Gutter.java:191)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at org.gjt.sp.jedit.gui.DockableWindowManagerImpl.paintChildren(DockableWindowManagerImpl.java:667)
at javax.swing.JComponent.paint(JComponent.java:1065)
I added a bounds check in getLineInfo in revision 24094 that I've been running for a couple of days. I haven't seen the problem since, but since I don't know how to reliably reproduce this, I'm not sure if this is a bandaid for a deeper problem or if this is sufficient. I'd appreciate others trying out this change to see if the problem is still there.
I'm assuming this is fixed since no one has continued to complain about it and I haven't seen the issue again in several months.