java.lang.StringIndexOutOfBoundsException: begin 0, end 4, length 2

JDK Bug System | Kevin Rushforth | 3 months ago
  1. 0

    While testing the latest build of FX for JDK 9, I was doing some random navigation on yahoo.com with HelloWebView and got an IOOBE on one of the pages. The exception message does not cause the application to fail, and the content seems to be rendered correctly in spite of the error. To reproduce, run HelloWebView as follows: $ java HelloWebView http://www.thedailyheel.com/20-stars-you-didnt-know-were-twins/?utm_source=yahoo&utm_medium=All&utm_campaign=DHCelebTwins0829 java.lang.StringIndexOutOfBoundsException: begin 0, end 4, length 2 at java.lang.String.checkBoundsBeginEnd(String.java:3122) at java.lang.String.substring(String.java:1910) at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.drawString(WCGraphicsPrismContext.java:960) at com.sun.webkit.graphics.GraphicsDecoder.decode(GraphicsDecoder.java:290) at com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:91) at com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:102) at com.sun.webkit.graphics.WCImage.flushRQ(WCImage.java:52) at com.sun.javafx.webkit.prism.RTImage.lambda$getPixelBuffer$2(RTImage.java:163) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:307) at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:632) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) at java.lang.Thread.run(Thread.java:804) java.lang.StringIndexOutOfBoundsException: begin 0, end 4, length 2 at java.lang.String.checkBoundsBeginEnd(String.java:3122) at java.lang.String.substring(String.java:1910) at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.drawString(WCGraphicsPrismContext.java:960) at com.sun.webkit.graphics.GraphicsDecoder.decode(GraphicsDecoder.java:290) at com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:91) at com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:102) at com.sun.webkit.graphics.WCImage.flushRQ(WCImage.java:52) at com.sun.javafx.webkit.prism.RTImage.lambda$getPixelBuffer$2(RTImage.java:163) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:307) at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:632) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) at java.lang.Thread.run(Thread.java:804)

    JDK Bug System | 3 months ago | Kevin Rushforth
    java.lang.StringIndexOutOfBoundsException: begin 0, end 4, length 2
  2. 0

    Re: Derbyall suite fails because of new version string format for JDK9

    db-derby-dev | 11 months ago | Rick Hillegas
    java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 4
  3. 0

    StringIndexOutOfBoundsException in com.googlecode.sardine.SardineImpl.getResources(SardineImpl.java:221)

    GitHub | 4 years ago | dkocher
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    warning at java.lang.StringIndexOutOfBoundsException: length=75; regionStart=0; regionLength=100

    Stack Overflow | 2 years ago | Oscar
    java.lang.StringIndexOutOfBoundsException: length=75; regionStart=0; regionLength=100 11-19 12:40:47.086: W/System.err(1644): at java.lang.String.startEndAndLength(String.java:588)
  6. 0

    How to fix the ERROR [[jsp]] Servlet.service() for servlet jsp threw exception?

    Stack Overflow | 2 years ago | balaguru
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1

  1. richard77 2 times, last 3 days ago
  2. kjhdofjosvs 2 times, last 1 week ago
  3. archenroot 17 times, last 2 weeks ago
  4. Alexandru Popa 2 times, last 4 weeks ago
  5. poroszd 3 times, last 1 month ago
18 more registered users
58 unregistered visitors
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.StringIndexOutOfBoundsException

    begin 0, end 4, length 2

    at java.lang.String.checkBoundsBeginEnd()
  2. Java RT
    String.substring
    1. java.lang.String.checkBoundsBeginEnd(String.java:3122)
    2. java.lang.String.substring(String.java:1910)
    2 frames
  3. com.sun.javafx
    WCGraphicsPrismContext.drawString
    1. com.sun.javafx.webkit.prism.WCGraphicsPrismContext.drawString(WCGraphicsPrismContext.java:960)
    1 frame
  4. com.sun.webkit
    WCImage.flushRQ
    1. com.sun.webkit.graphics.GraphicsDecoder.decode(GraphicsDecoder.java:290)
    2. com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:91)
    3. com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:102)
    4. com.sun.webkit.graphics.WCImage.flushRQ(WCImage.java:52)
    4 frames
  5. com.sun.javafx
    RTImage.lambda$getPixelBuffer$2
    1. com.sun.javafx.webkit.prism.RTImage.lambda$getPixelBuffer$2(RTImage.java:163)
    1 frame
  6. Java RT
    FutureTask.runAndReset
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    3. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
    4. java.util.concurrent.FutureTask.runAndReset(FutureTask.java:307)
    4 frames
  7. com.sun.javafx
    RenderJob.run
    1. com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    1 frame
  8. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:632)
    2 frames
  9. com.sun.javafx
    QuantumRenderer$PipelineRunnable.run
    1. com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
    1 frame
  10. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:804)
    1 frame