zjhmale / intellij-clojure-pretty-symbol

Pretty symbols for your Clojure development with IntelliJ IDEA
39 stars 2 forks source link

String index out of range: -1 #15

Open rssole opened 8 years ago

rssole commented 8 years ago

I couldn't tell exactly what I was doing as I didn't notice it immediately. I am submitting it here just for author to be aware and perhaps could help with resolving it. If it is noticed before sorry for repeated alarm :) Below are all details as caught by IntelliJ:

Cheers :)

String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1960) at zjhmale.cps.CPSFoldingBuilder.buildFoldRegions(CPSFoldingBuilder.kt:250) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:90) at com.intellij.lang.folding.CompositeFoldingBuilder.buildFoldRegions(CompositeFoldingBuilder.java:60) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:83) at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:243) at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:229) at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:116) at com.intellij.codeInsight.folding.impl.FoldingUpdate.access$000(FoldingUpdate.java:55) at com.intellij.codeInsight.folding.impl.FoldingUpdate$1.compute(FoldingUpdate.java:104) at com.intellij.codeInsight.folding.impl.FoldingUpdate$1.compute(FoldingUpdate.java:99) at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:53) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222) at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:65) at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:43) at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:97) at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:98) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.a(CodeFoldingManagerImpl.java:335) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:320) at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:42) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:427) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:426) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1960) at zjhmale.cps.CPSFoldingBuilder.buildFoldRegions(CPSFoldingBuilder.kt:250) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:90) at com.intellij.lang.folding.CompositeFoldingBuilder.buildFoldRegions(CompositeFoldingBuilder.java:60) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:83) at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:243) at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:229) at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:116) at com.intellij.codeInsight.folding.impl.FoldingUpdate.access$000(FoldingUpdate.java:55) at com.intellij.codeInsight.folding.impl.FoldingUpdate$1.compute(FoldingUpdate.java:104) at com.intellij.codeInsight.folding.impl.FoldingUpdate$1.compute(FoldingUpdate.java:99) at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:53) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222) at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:65) at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:43) at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:97) at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:98) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.a(CodeFoldingManagerImpl.java:335) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:320) at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:42) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:427) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:426) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1960) at zjhmale.cps.CPSFoldingBuilder.buildFoldRegions(CPSFoldingBuilder.kt:250) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:90) at com.intellij.lang.folding.CompositeFoldingBuilder.buildFoldRegions(CompositeFoldingBuilder.java:60) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:83) at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:243) at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:229) at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:116) at com.intellij.codeInsight.folding.impl.FoldingUpdate.access$000(FoldingUpdate.java:55) at com.intellij.codeInsight.folding.impl.FoldingUpdate$1.compute(FoldingUpdate.java:104) at com.intellij.codeInsight.folding.impl.FoldingUpdate$1.compute(FoldingUpdate.java:99) at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:53) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222) at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:65) at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:43) at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:97) at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:98) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.a(CodeFoldingManagerImpl.java:335) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:320) at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:42) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:427) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:426) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1960) at zjhmale.cps.CPSFoldingBuilder.buildFoldRegions(CPSFoldingBuilder.kt:250) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:90) at com.intellij.lang.folding.CompositeFoldingBuilder.buildFoldRegions(CompositeFoldingBuilder.java:60) at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:83) at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:243) at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:229) at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:116) at com.intellij.codeInsight.folding.impl.FoldingUpdate.access$000(FoldingUpdate.java:55) at com.intellij.codeInsight.folding.impl.FoldingUpdate$1.compute(FoldingUpdate.java:104) at com.intellij.codeInsight.folding.impl.FoldingUpdate$1.compute(FoldingUpdate.java:99) at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:53) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222) at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:65) at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:43) at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:97) at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:98) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.a(CodeFoldingManagerImpl.java:335) at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:320) at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:42) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:427) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:426) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

zjhmale commented 8 years ago

@rssole Thx for reporting! i'll fix it as soon as possible.

BTW, could you paste up some code snippets which will trigger this exception? that will be really helpful :)