Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3278 jedit freezes on this file

normal bug
closed-fixed
nobody
5
2009-08-27
2009-06-18
Sergey Zhumatiy
No

File can be succesfully opened, but if I go to lines after 3400 (approx), all windows and controls in jedit freeze. They are shown, I can minimize and restore window and see all content, but cannot move cursor, press buttons, enter text. CPU is concumed at 100% (one core on my double-core machine).

Discussion

  • jedit killer file

     
    Attachments
  • I use jedit 4.3pre16, linux Ubuntu Jaunty, sun java 6.

     
  • Dale Anson
    Dale Anson
    2009-06-18

    I see the same problem with this file using the latest jEdit 4.3pre17 from SVN.

     
  • Dale Anson
    Dale Anson
    2009-06-18

    I held down the "page down" key until about line 3430, then jEdit locks up as reported. I captured this thread dump:

    Full thread dump Java HotSpot(TM) Client VM (11.3-b02 mixed mode, sharing):

    "jEdit server daemon [/home/danson/.jedit/server]" daemon prio=10 tid=0x0980c400 nid=0x569 runnable [0xb4f4b000..0xb4f4c0a0]
    java.lang.Thread.State: RUNNABLE
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
    - locked <0x81732898> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(ServerSocket.java:453)
    at java.net.ServerSocket.accept(ServerSocket.java:421)
    at org.gjt.sp.jedit.EditServer.run(EditServer.java:132)

    "jEdit I/O #4" prio=10 tid=0x0980b000 nid=0x568 in Object.wait() [0xb4f9c000..0xb4f9d020]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x81797880> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:485)
    at org.gjt.sp.util.WorkThread.doRequests(WorkThread.java:198)
    - locked <0x81797880> (a java.lang.Object)
    at org.gjt.sp.util.WorkThread.run(WorkThread.java:154)

    "jEdit I/O #3" prio=10 tid=0x094a8400 nid=0x567 in Object.wait() [0xb4fed000..0xb4fedfa0]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x81797880> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:485)
    at org.gjt.sp.util.WorkThread.doRequests(WorkThread.java:198)
    - locked <0x81797880> (a java.lang.Object)
    at org.gjt.sp.util.WorkThread.run(WorkThread.java:154)

    "jEdit I/O #2" prio=10 tid=0x097e0c00 nid=0x566 in Object.wait() [0xb503e000..0xb503ef20]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x81797880> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:485)
    at org.gjt.sp.util.WorkThread.doRequests(WorkThread.java:198)
    - locked <0x81797880> (a java.lang.Object)
    at org.gjt.sp.util.WorkThread.run(WorkThread.java:154)

    "jEdit I/O #1" prio=10 tid=0x097e0000 nid=0x565 in Object.wait() [0xb50ab000..0xb50abea0]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x81797880> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:485)
    at org.gjt.sp.util.WorkThread.doRequests(WorkThread.java:198)
    - locked <0x81797880> (a java.lang.Object)
    at org.gjt.sp.util.WorkThread.run(WorkThread.java:154)

    "DestroyJavaVM" prio=10 tid=0x0904e800 nid=0x550 waiting on condition [0x00000000..0xb7eda060]
    java.lang.Thread.State: RUNNABLE

    "Thread-3" prio=10 tid=0x093d8800 nid=0x562 waiting on condition [0xb5126000..0xb5126120]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
    at java.lang.Thread.sleep(Native Method)
    at ise.plugin.bmp.BufferLocalPlugin$2.run(BufferLocalPlugin.java:111)

    "Thread-2" prio=10 tid=0x092bf000 nid=0x561 waiting on condition [0xb5176000..0xb51770a0]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
    at java.lang.Thread.sleep(Native Method)
    at ise.plugin.bmp.BufferLocalPlugin$1.run(BufferLocalPlugin.java:90)

    "TimerQueue" daemon prio=10 tid=0x093ab000 nid=0x55f in Object.wait() [0xb51d3000..0xb51d4020]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x81bbc4d8> (a javax.swing.TimerQueue)
    at javax.swing.TimerQueue.run(TimerQueue.java:236)
    - locked <0x81bbc4d8> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Thread.java:619)

    "AWT-EventQueue-0" prio=10 tid=0x092fe800 nid=0x55c runnable [0xb5281000..0xb5283f20]
    java.lang.Thread.State: RUNNABLE
    at java.util.regex.Pattern$Loop.match(Pattern.java:4304)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
    at java.util.regex.Pattern$Loop.matchInit(Pattern.java:4314)
    at java.util.regex.Pattern$Prolog.match(Pattern.java:4251)
    at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
    at java.util.regex.Pattern$Curly.match0(Pattern.java:3789)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3744)
    at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
    at java.util.regex.Pattern$Curly.match1(Pattern.java:3797)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3746)
    at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
    at java.util.regex.Pattern$Curly.match0(Pattern.java:3789)
    at java.util.regex.Pattern$Curly.match(Pattern.java:3744)
    at java.util.regex.Pattern$Slice.match(Pattern.java:3482)
    at java.util.regex.Matcher.match(Matcher.java:1127)
    at java.util.regex.Matcher.lookingAt(Matcher.java:579)
    at org.gjt.sp.jedit.syntax.TokenMarker.handleRule(TokenMarker.java:420)
    at org.gjt.sp.jedit.syntax.TokenMarker.markTokens(TokenMarker.java:162)
    at org.gjt.sp.jedit.buffer.JEditBuffer.markTokens(JEditBuffer.java:1333)
    at org.gjt.sp.jedit.textarea.ChunkCache.lineToChunkList(ChunkCache.java:794)
    at org.gjt.sp.jedit.textarea.ChunkCache.updateChunksUpTo(ChunkCache.java:676)
    at org.gjt.sp.jedit.textarea.ChunkCache.getLineInfo(ChunkCache.java:261)
    at org.gjt.sp.jedit.textarea.TextArea.recalculateLastPhysicalLine(TextArea.java:5481)
    at org.gjt.sp.jedit.textarea.DisplayManager.notifyScreenLineChanges(DisplayManager.java:557)
    at org.gjt.sp.jedit.textarea.DisplayManager.setFirstLine(DisplayManager.java:593)
    at org.gjt.sp.jedit.textarea.TextArea.setFirstLine(TextArea.java:567)
    at org.gjt.sp.jedit.textarea.TextArea.scrollDownPage(TextArea.java:718)
    at org.gjt.sp.jedit.textarea.TextArea.goToNextPage(TextArea.java:2486)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.gjt.sp.jedit.bsh.Reflect.invokeMethod(Reflect.java:134)
    at org.gjt.sp.jedit.bsh.Reflect.invokeObjectMethod(Reflect.java:80)
    at org.gjt.sp.jedit.bsh.Name.invokeMethod(Name.java:855)
    at org.gjt.sp.jedit.bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
    at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
    at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
    at org.gjt.sp.jedit.bsh.BSHBlock.evalBlock(BSHBlock.java:130)
    at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:80)
    at org.gjt.sp.jedit.bsh.BshMethod.invokeImpl(BshMethod.java:362)
    at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:258)
    at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:186)
    at org.gjt.sp.jedit.BeanShellFacade.runCachedBlock(BeanShellFacade.java:225)
    at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:423)
    at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:73)
    at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:352)
    at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:317)
    at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:197)
    at org.gjt.sp.jedit.input.AbstractInputHandler.processKeyEventKeyStrokeHandling(AbstractInputHandler.java:405)
    at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:151)
    at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4528)
    at java.awt.Component.processEvent(Component.java:5993)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4583)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
    at java.awt.Component.dispatchEventImpl(Component.java:4455)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    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)

    "AWT-Shutdown" prio=10 tid=0x092fd000 nid=0x55b in Object.wait() [0xb52d4000..0xb52d4ea0]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x814d3960> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:485)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
    - locked <0x814d3960> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:619)

    "AWT-XAWT" daemon prio=10 tid=0x0917a800 nid=0x559 runnable [0xb53d9000..0xb53d9da0]
    java.lang.Thread.State: RUNNABLE
    at sun.awt.X11.XToolkit.waitForEvents(Native Method)
    at sun.awt.X11.XToolkit.run(XToolkit.java:548)
    at sun.awt.X11.XToolkit.run(XToolkit.java:523)
    at java.lang.Thread.run(Thread.java:619)

    "Java2D Disposer" daemon prio=10 tid=0x09116800 nid=0x558 in Object.wait() [0xb5450000..0xb5451120]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x814fb010> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x814fb010> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at sun.java2d.Disposer.run(Disposer.java:125)
    at java.lang.Thread.run(Thread.java:619)

    "Low Memory Detector" daemon prio=10 tid=0x09086c00 nid=0x556 runnable [0x00000000..0x00000000]
    java.lang.Thread.State: RUNNABLE

    "CompilerThread0" daemon prio=10 tid=0x09083800 nid=0x555 waiting on condition [0x00000000..0xb5a7ea58]
    java.lang.Thread.State: RUNNABLE

    "Signal Dispatcher" daemon prio=10 tid=0x09082000 nid=0x554 waiting on condition [0x00000000..0x00000000]
    java.lang.Thread.State: RUNNABLE

    "Finalizer" daemon prio=10 tid=0x0907bc00 nid=0x553 in Object.wait() [0xb5b66000..0xb5b66ea0]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x814cfb28> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x814cfb28> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

    "Reference Handler" daemon prio=10 tid=0x09077400 nid=0x552 in Object.wait() [0xb5bb7000..0xb5bb7e20]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x814cfbb0> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x814cfbb0> (a java.lang.ref.Reference$Lock)

    "VM Thread" prio=10 tid=0x09075800 nid=0x551 runnable

    "VM Periodic Task Thread" prio=10 tid=0x0909a800 nid=0x557 waiting on condition

    JNI global references: 1552

    Heap
    def new generation total 3520K, used 2897K [0x80110000, 0x804e0000, 0x814c0000)
    eden space 3136K, 89% used [0x80110000, 0x803ce428, 0x80420000)
    from space 384K, 22% used [0x80420000, 0x804360c8, 0x80480000)
    to space 384K, 0% used [0x80480000, 0x80480000, 0x804e0000)
    tenured generation total 46396K, used 43262K [0x814c0000, 0x8420f000, 0x90110000)
    the space 46396K, 93% used [0x814c0000, 0x83eff980, 0x83effa00, 0x8420f000)
    compacting perm gen total 12288K, used 6606K [0x90110000, 0x90d10000, 0x94110000)
    the space 12288K, 53% used [0x90110000, 0x90783b30, 0x90783c00, 0x90d10000)
    ro space 8192K, 74% used [0x94110000, 0x94708b48, 0x94708c00, 0x94910000)
    rw space 12288K, 58% used [0x94910000, 0x95023df0, 0x95023e00, 0x95510000)

     
  • Possibly a bug in java regex (or simply broken regex in python edit mode).
    Matching string from a file against regex results to endless loop in java regex library:

    import java.util.regex.Pattern;

    public class FaultyRegex {
    public static void main(String[] args) {
    final String str = "tr{\\;\\*\\&\\\\~\\?\\&lt;\\&gt;\\|\\'\\\"\\`}{}d; # remove uliked symbols #`";
    final String regex = "tr\\s*\\{.*?[^\\\\]\\}\\s*\\{(?:.*?[^\\\\])*\\}[cds]*";
    System.out.println(Pattern.compile(regex).matcher(str).lookingAt());
    }
    }

     
  • Same problem for me, it seems it is this perl.xml rule that fails :
    <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"
    AT_WORD_START="TRUE">tr\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*\}[cds]*</SEQ_REGEXP>

    when trying to match on tr{\;\*\&\\~\?\&lt;\&gt;\|\'\"\`}{}d; # remove uliked symbols #`
    the regexp never ends

     
  • Hmm, not sure, but just tried a number of things:

    $ split cleosupport.pm
    # jEdit opens up xaa, xab, ..., xah just fine, all readable, still responsive, no cpu spike

    $ ln -s cleosupport{.pm,}
    # jEdit opens up cleosupport (no .pm extension) just fine, all readable, still responsive, no cpu spike

    # further, I'm able to manually change the mode (perl) with no issues, no cpu spike, etc.

    However, the error occurs for me while scrolling down. The last visible line is

    3,467: "$arg =~ s!/+$!!; # remove trailing slash(es)"

     
  • Whoops, same diagnosis. Looks like I should have refreshed before commenting. :-) You're on it.

     
  • Looks like it takes too much time to match against long strings:
    time in nanosec input string
    69450180 - tr{\;\*\&\\~\?\&lt;\&gt;\|\'\"\`}{}d; # remove ul
    156558292 - tr{\;\*\&\\~\?\&lt;\&gt;\|\'\"\`}{}d; # remove uli
    335324459 - tr{\;\*\&\\~\?\&lt;\&gt;\|\'\"\`}{}d; # remove ulik
    549004122 - tr{\;\*\&\\~\?\&lt;\&gt;\|\'\"\`}{}d; # remove ulike
    1062590822 - tr{\;\*\&\\~\?\&lt;\&gt;\|\'\"\`}{}d; # remove uliked
    2280209214 - tr{\;\*\&\\~\?\&lt;\&gt;\|\'\"\`}{}d; # remove uliked
    4330749467 - tr{\;\*\&\\~\?\&lt;\&gt;\|\'\"\`}{}d; # remove uliked s
    Time increments by two with each letter added to input.
    I don't know perl and I don't know what this regex mean, but is is too generic to me (only curly and "cds" letters is fixed, possibly regex could be narrowed in some way?

     
  • oh I was too slow ;)

     
  • This regexp is very simple. If you simply delete all backslashes, you'll get list of "bad" characters, which must be deleted from input by this regexp... Backslashes are required :)
    Some lines below contains regexps, then comment like this:

    bla-bla-bla #` comment

    Reverse quote after '#' is placed for mc-editor. I use it sometimes (like now), but its syntax highlighter does not understand backslashed quote in regexp and needs dummy "closing" quote...
    May be here some like this is heppening?

    Can I help by modifying highlighter or something? If yes, where can I find source code for it?

     
  • Dennis Sheil
    Dennis Sheil
    2009-07-24

    jEdit loading a file named test.pl containing only the following line -

    $a =~ tr{a}{b}; # abcdef ghijkl mnopq rstuv wxyz abcdefg hijkl

    will cause the same behavior with jEdit - CPU goes to 100% for several minutes, cant enter text, press buttons etc. This will not happen if
    1) The file suffix is .txt, not .pl (or .pm)
    2) The comment is shortened to only several characters
    3) The curly brackets are changed to forward slashes format for tr
    4) tr is changed to something like s, and the trailing d is changed to g

     
  • Dennis Sheil
    Dennis Sheil
    2009-07-26

    I have created a patch which half-solves the problem. Right now, the lookingAt method is hitting a geometric progression in cpu time with a scale of 2, which every additional character at the end of the line doubling the amount of cpu processing time, to where I estimate a 79 character line would take several cpu years to parse. My patch kills this progression if lookingAt returns true, meaning if the Perl code is good. If the Perl code is bad, for example, bad backslashes in the second pair of curly brackets in transliteration, then lookingAt is going to return false, and it bumps up against that geometric progression thing again. So my patch fixes the hanging if the Perl code is good (lookingAt returns true fairly quickly now), but if the Perl code is bad it still hangs (lookingAt returns false...eventually). So this is still an open bug. It is only half-fixed.

    Anyhow my patch (#2827234) which fixes it partially, but not fully, is on the patch page. It simply adds one character to the perl.xml file, a question mark which changes a "greedy" quantifier into a "reluctant" quantifier. This does not have any effect on the regular expression or the return value of lookingAt other than lookingAt now returns "true" much faster. Having that greedy quantifier in that regular expression is completely pointless - it does nothing, other than hang the program.

     
  • Dennis Sheil
    Dennis Sheil
    2009-08-05

    I was looking through the perl.xml file and noticed this bug holds true for the y operator as well. Thus, the legal Perl program -

    #!/usr/bin/perl
    $a = "banana";
    print "$a\n";
    $a =~ y{a}{z}; # abcdef ghijkl mnopq rstuv wxyz abcdefg hijkl
    print "$a\n";

    Will take many cpu years to compute. jEdit will freeze on the above, legal Perl file as well. So this needs to be patched too, aside from the tr transliteration patch.

     
  • Dennis Sheil
    Dennis Sheil
    2009-08-23

    I update the patch (#2827234) so that the problem is fixed in cases where Perl syntax is correct for the y operator as well as the tr operator. Even if the patch is applied, this bug report should still remain open since jEdit can hang for CPU years in cases where the Perl syntax is incorrect. But the patch (two question marks added to the perl.xml file) fixes the problem for cases when the program Perl syntax is correct.

     
  • Marcelo Vanzin
    Marcelo Vanzin
    2009-08-27

    Fixed in rev #16080.

     
  • Marcelo Vanzin
    Marcelo Vanzin
    2009-08-27

    • status: open --> closed-fixed