java.lang.IllegalArgumentException: Wrong end: 270; document length=249; start=246

Atlassian JIRA | Marek Parfianowicz [Atlassian] | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Try the following example: {code:java} class Unicode { void foo() { System.out.println("1"); /** {@code \u000a} LF */ } void goo() { System.out.println("2"); /** {@code \u000d} CR */ } void hoo() { System.out.println("3"); } } // end {code} In Eclipse editor, every CR/LF written in unicode causes that it interprets it as newline character. As a result left ruler "sees" more lines and all subsequent coverage blocks are shifted down. In IntelliJ it's even worse, as we get exception. Stack trace: {noformat} Error during dispatching of java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.cenqua.clover.idea.content.ContentPlugin$1@789e7511,notifier=null,catchExceptions=false,when=1343648365649] on sun.awt.windows.WToolkit@2018aa27: Wrong end: 270; document length=249; start=246 java.lang.IllegalArgumentException: Wrong end: 270; document length=249; start=246 at com.intellij.openapi.editor.impl.RangeMarkerImpl.<init>(RangeMarkerImpl.java:47) at com.intellij.openapi.editor.impl.DocumentImpl.createRangeMarker(DocumentImpl.java:303) at com.intellij.openapi.editor.impl.RangeHighlighterImpl.<init>(RangeHighlighterImpl.java:58) at com.intellij.openapi.editor.impl.MarkupModelImpl.a(MarkupModelImpl.java:119) at com.intellij.openapi.editor.impl.MarkupModelImpl.addRangeHighlighter(MarkupModelImpl.java:135) at com.cenqua.clover.idea.content.DocMarkupPlugin$HighlightMarkupBuilder.highlightStatement(DocMarkupPlugin.java:286) at com.cenqua.clover.idea.content.DocMarkupPlugin$HighlightMarkupBuilder.process(DocMarkupPlugin.java:220) at com.cenqua.clover.idea.content.DocMarkupPlugin.updateMarkups(DocMarkupPlugin.java:136) at com.cenqua.clover.idea.content.DocMarkupPlugin.refresh(DocMarkupPlugin.java:424) at com.cenqua.clover.idea.content.ContentPlugin$1.run(ContentPlugin.java:96) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646) at java.awt.EventQueue.access$000(EventQueue.java:84) at java.awt.EventQueue$1.run(EventQueue.java:607) at java.awt.EventQueue$1.run(EventQueue.java:605) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:616) at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:627) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:508) at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369) 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) {noformat}

    Atlassian JIRA | 5 years ago | Marek Parfianowicz [Atlassian]
    java.lang.IllegalArgumentException: Wrong end: 270; document length=249; start=246
  2. 0

    Try the following example: {code:java} class Unicode { void foo() { System.out.println("1"); /** {@code \u000a} LF */ } void goo() { System.out.println("2"); /** {@code \u000d} CR */ } void hoo() { System.out.println("3"); } } // end {code} In Eclipse editor, every CR/LF written in unicode causes that it interprets it as newline character. As a result left ruler "sees" more lines and all subsequent coverage blocks are shifted down. In IntelliJ it's even worse, as we get exception. Stack trace: {noformat} Error during dispatching of java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.cenqua.clover.idea.content.ContentPlugin$1@789e7511,notifier=null,catchExceptions=false,when=1343648365649] on sun.awt.windows.WToolkit@2018aa27: Wrong end: 270; document length=249; start=246 java.lang.IllegalArgumentException: Wrong end: 270; document length=249; start=246 at com.intellij.openapi.editor.impl.RangeMarkerImpl.<init>(RangeMarkerImpl.java:47) at com.intellij.openapi.editor.impl.DocumentImpl.createRangeMarker(DocumentImpl.java:303) at com.intellij.openapi.editor.impl.RangeHighlighterImpl.<init>(RangeHighlighterImpl.java:58) at com.intellij.openapi.editor.impl.MarkupModelImpl.a(MarkupModelImpl.java:119) at com.intellij.openapi.editor.impl.MarkupModelImpl.addRangeHighlighter(MarkupModelImpl.java:135) at com.cenqua.clover.idea.content.DocMarkupPlugin$HighlightMarkupBuilder.highlightStatement(DocMarkupPlugin.java:286) at com.cenqua.clover.idea.content.DocMarkupPlugin$HighlightMarkupBuilder.process(DocMarkupPlugin.java:220) at com.cenqua.clover.idea.content.DocMarkupPlugin.updateMarkups(DocMarkupPlugin.java:136) at com.cenqua.clover.idea.content.DocMarkupPlugin.refresh(DocMarkupPlugin.java:424) at com.cenqua.clover.idea.content.ContentPlugin$1.run(ContentPlugin.java:96) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646) at java.awt.EventQueue.access$000(EventQueue.java:84) at java.awt.EventQueue$1.run(EventQueue.java:607) at java.awt.EventQueue$1.run(EventQueue.java:605) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:616) at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:627) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:508) at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369) 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) {noformat}

    Atlassian JIRA | 5 years ago | Marek Parfianowicz [Atlassian]
    java.lang.IllegalArgumentException: Wrong end: 270; document length=249; start=246
  3. 0

    Exception in opening a file.

    GitHub | 2 years ago | ScrapCodes
    java.lang.IllegalArgumentException: Wrong end: 1497; document length=1285; start=1467
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 447#164357185

    GitHub | 1 year ago | ScrapCodes
    java.lang.IllegalArgumentException: Wrong end: 3126; document length=0; start=3105
  6. 0

    Visualizer: .css.map files are not shown

    YouTrack | 3 years ago
    java.lang.IllegalArgumentException: start > end: start=197; end=168

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Wrong end: 270; document length=249; start=246

      at com.intellij.openapi.editor.impl.RangeMarkerImpl.<init>()
    2. IDEA
      MarkupModelImpl.addRangeHighlighter
      1. com.intellij.openapi.editor.impl.RangeMarkerImpl.<init>(RangeMarkerImpl.java:47)
      2. com.intellij.openapi.editor.impl.DocumentImpl.createRangeMarker(DocumentImpl.java:303)
      3. com.intellij.openapi.editor.impl.RangeHighlighterImpl.<init>(RangeHighlighterImpl.java:58)
      4. com.intellij.openapi.editor.impl.MarkupModelImpl.a(MarkupModelImpl.java:119)
      5. com.intellij.openapi.editor.impl.MarkupModelImpl.addRangeHighlighter(MarkupModelImpl.java:135)
      5 frames
    3. com.cenqua.clover
      ContentPlugin$1.run
      1. com.cenqua.clover.idea.content.DocMarkupPlugin$HighlightMarkupBuilder.highlightStatement(DocMarkupPlugin.java:286)
      2. com.cenqua.clover.idea.content.DocMarkupPlugin$HighlightMarkupBuilder.process(DocMarkupPlugin.java:220)
      3. com.cenqua.clover.idea.content.DocMarkupPlugin.updateMarkups(DocMarkupPlugin.java:136)
      4. com.cenqua.clover.idea.content.DocMarkupPlugin.refresh(DocMarkupPlugin.java:424)
      5. com.cenqua.clover.idea.content.ContentPlugin$1.run(ContentPlugin.java:96)
      5 frames
    4. Java RT
      EventQueue.dispatchEvent
      1. java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      2. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
      3. java.awt.EventQueue.access$000(EventQueue.java:84)
      4. java.awt.EventQueue$1.run(EventQueue.java:607)
      5. java.awt.EventQueue$1.run(EventQueue.java:605)
      6. java.security.AccessController.doPrivileged(Native Method)
      7. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      8. java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
      8 frames
    5. IDEA
      IdeEventQueue.dispatchEvent
      1. com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:627)
      2. com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:508)
      3. com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
      4. com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
      4 frames
    6. Java RT
      EventDispatchThread.run
      1. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      2. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      3. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      4. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      5. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      6. java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      6 frames