Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit dart code throw StringIndexOutOfBoundsException #7285

Closed
wanggaowan opened this issue Mar 18, 2024 · 0 comments · Fixed by #7428
Closed

Edit dart code throw StringIndexOutOfBoundsException #7285

wanggaowan opened this issue Mar 18, 2024 · 0 comments · Fixed by #7428
Labels
Milestone

Comments

@wanggaowan
Copy link

What happened

edit dart code

Version information

IntelliJ IDEA 2023.3 • Flutter plugin io.flutter 78.3.1 • Dart plugin 233.11799.172

Flutter 3.13.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2524052335 (6 months ago) • 2023-09-06 14:32:31 -0700
Engine • revision b8d35810e9
Tools • Dart 3.1.1 • DevTools 2.25.0

Exception

null

java.lang.StringIndexOutOfBoundsException: offset 68, count 1981, length 1051
	at java.base/java.lang.String.checkBoundsOffCount(String.java:4591)
	at java.base/java.lang.String.getChars(String.java:1679)
	at com.intellij.util.text.CharArrayUtil.getChars(CharArrayUtil.java:60)
	at com.intellij.util.text.CharArrayUtil.getChars(CharArrayUtil.java:40)
	at com.intellij.util.text.CharArrayUtil.getChars(CharArrayUtil.java:28)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.copyTo(LazyParseableElement.java:249)
	at com.intellij.psi.impl.source.tree.AstBufferUtil$BufferVisitor.visitComposite(AstBufferUtil.java:88)
	at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:112)
	at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:66)
	at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:58)
	at com.intellij.util.WalkingState.walkChildren(WalkingState.java:65)
	at com.intellij.util.WalkingState.elementStarted(WalkingState.java:42)
	at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitNode(RecursiveTreeElementWalkingVisitor.java:85)
	at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitComposite(RecursiveTreeElementWalkingVisitor.java:80)
	at com.intellij.psi.impl.source.tree.AstBufferUtil$BufferVisitor.visitComposite(AstBufferUtil.java:96)
	at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:112)
	at com.intellij.psi.impl.source.tree.AstBufferUtil.toBuffer(AstBufferUtil.java:22)
	at com.intellij.psi.impl.source.tree.AstBufferUtil.getTextSkippingWhitespaceComments(AstBufferUtil.java:29)
	at io.flutter.editor.FlutterColorProvider.parseColorElements(FlutterColorProvider.java:184)
	at io.flutter.editor.FlutterColorProvider.getColorFrom(FlutterColorProvider.java:75)
	at com.intellij.ui.ColorLineMarkerProvider.lambda$collectSlowLineMarkers$0(ColorLineMarkerProvider.java:47)
	at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.computeSafeIfAny(ExtensionProcessingHelper.kt:59)
	at com.intellij.openapi.extensions.ExtensionPointName.computeSafeIfAny(ExtensionPointName.kt:58)
	at com.intellij.ui.ColorLineMarkerProvider.collectSlowLineMarkers(ColorLineMarkerProvider.java:46)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:225)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectMarkers$2(LineMarkersPass.java:113)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:98)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectMarkers(LineMarkersPass.java:103)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:76)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:406)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows(trace.kt:76)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows(TraceUtil.java:34)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:401)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:392)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:391)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:367)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:200)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:184)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:365)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:187)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
@wanggaowan wanggaowan changed the title Edit dart code StringIndexOutOfBoundsException Edit dart code throw StringIndexOutOfBoundsException Mar 18, 2024
@jwren jwren added the bug label Apr 10, 2024
@jwren jwren added this to the M80 milestone Apr 10, 2024
jwren added a commit to jwren/flutter-intellij that referenced this issue May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants