Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3847 Elastic Tabstops and external file changes freezes jEdit

minor bug
open
nobody
5
2013-12-16
2013-12-16
No

I have Elastic Tabstops enabled as follows (jEdit setting in the beginning of some files). I also have two or more files open. If I use something like 'git stash' and 'git stash pop' to cause external file changes, then jEdit freezes after trying to Reload the file. All I get is an editor window with a single character of text on every line. Repainting is frozen, Switching tabs etc are all unresponsive. I have to kill jEdit and restart for jEdit to work again. No error message pops up though.


/
jEdit runtime options: :elasticTabstops=true:
/


If I disable Elastic Tabstop support by making the above value =false then do the external file changes, then reload works perfectly. I can duplicate this issue at will. The type of reload setting (prompt, auto reload with prompt, auto reload without prompt) makes no difference. It seems to be down to the fact when Elastic Tabstops is enabled.

NOTE: I have Elastic Tabstops disable in the Global Options dialog. I'm using jEdit 5.1.0 under 64-bit Windows 7 (with latest updates installed). I have 64-bit Oracle Java 1.7.0_45 installed.

Installed plugins:
- BufferTabs
- Common Controls
- CssEditor
- EclipseIcons
- Editor Scheme
- ErrorList
- Info Viewer
- QuickNotepad
- SideKick
- Spell Check
- TaskList
- TextTools
- WhiteSpace
- XercesPlugin
- XML
- XSLT

Discussion

  • Sorry, Markdown formatting screwed up my post. The file contents is a multi-line comment in a .sql script file. Something like this (but without the space between the forward slash and asterics:
    ---------------------------------
    /

    jEdit runtime options: :elasticTabstops=true:
    * /
    ---------------------------------

     
  • I noticed that jEdit showed "10 error(s)" in the status bar. It relates to Elastic Tabstops, backup up my testing that it is Elastic Tabstops causing the reload error.

    =======================================
    java.lang.IllegalArgumentException: Unaccounted tab at line 14 at index 312
    at org.gjt.sp.jedit.textarea.ElasticTabstopsTabExpander.nextTabStop(ElasticTabstopsTabExpander.java:51)
    at org.gjt.sp.jedit.syntax.Chunk.init(Chunk.java:439)
    at org.gjt.sp.jedit.syntax.DisplayTokenHandler.initChunk(DisplayTokenHandler.java:181)
    at org.gjt.sp.jedit.syntax.DisplayTokenHandler.initChunks(DisplayTokenHandler.java:190)
    at org.gjt.sp.jedit.syntax.DisplayTokenHandler.makeScreenLine(DisplayTokenHandler.java:398)
    at org.gjt.sp.jedit.syntax.DisplayTokenHandler.handleToken(DisplayTokenHandler.java:102)
    at org.gjt.sp.jedit.syntax.TokenMarker.markTokens(TokenMarker.java:252)
    at org.gjt.sp.jedit.Buffer.markTokens(Buffer.java:1721)
    at org.gjt.sp.jedit.buffer.JEditBuffer.markTokens(JEditBuffer.java:1373)
    at org.gjt.sp.jedit.textarea.ChunkCache.lineToChunkList(ChunkCache.java:824)
    at org.gjt.sp.jedit.textarea.ChunkCache.updateChunksUpTo(ChunkCache.java:699)
    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:894)
    at javax.swing.JComponent.paintToOffscreen(Unknown Source)
    at javax.swing.BufferStrategyPaintManager.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$3.run(Unknown Source)
    at javax.swing.RepaintManager$3.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$1100(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$200(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)
    =======================================

    ...and this error...

    =======================================
    java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 118
    at org.gjt.sp.jedit.buffer.JEditBuffer.getLineText(JEditBuffer.java:518)
    at org.gjt.sp.jedit.buffer.JEditBuffer.updateColumnBlocks(JEditBuffer.java:2923)
    at org.gjt.sp.jedit.textarea.ElasticTabStopBufferListener.contentInserted(ElasticTabStopBufferListener.java:201)
    at org.gjt.sp.jedit.buffer.JEditBuffer.fireContentInserted(JEditBuffer.java:2462)
    at org.gjt.sp.jedit.buffer.JEditBuffer.loadText(JEditBuffer.java:2660)
    at org.gjt.sp.jedit.Buffer.access$000(Buffer.java:97)
    at org.gjt.sp.jedit.Buffer$1.run(Buffer.java:252)
    at org.gjt.sp.util.AwtRunnableQueue$RunRequestsInAWTThread.doAWTRequest(AwtRunnableQueue.java:158)
    at org.gjt.sp.util.AwtRunnableQueue$RunRequestsInAWTThread.run(AwtRunnableQueue.java:137)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(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)
    =======================================

     
    Last edit: Graeme Geldenhuys 2013-12-16