flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.99k stars 318 forks source link

EditorPerfDecorations.addRangeHighlighter exception #5828

Closed fabiancrx closed 6 months ago

fabiancrx commented 3 years ago

Please file this bug report at https://github.com/flutter/flutter-intellij/issues/new.


What happened

Used the remove a widget quick action, error popped in the IDE, notification bar, no other side effect, or error found and continued working.

Version information

IntelliJ IDEA 2021.1.3 • Flutter plugin io.flutter 61.2.3 • Dart plugin 211.7792

Flutter 2.5.2 • channel stable • https://github.com/flutter/flutter.git Framework • revision 3595343e20 (3 weeks ago) • 2021-09-30 12:58:18 -0700 Engine • revision 6ac856380f Tools • Dart 2.14.3

Exception

null

java.lang.IllegalArgumentException: Wrong end: 8491; document length=8182; start=8487
    at com.intellij.openapi.editor.impl.RangeMarkerImpl.<init>(RangeMarkerImpl.java:62)
    at com.intellij.openapi.editor.impl.RangeMarkerImpl.<init>(RangeMarkerImpl.java:38)
    at com.intellij.openapi.editor.impl.RangeHighlighterImpl.<init>(RangeHighlighterImpl.java:74)
    at com.intellij.openapi.editor.impl.MarkupModelImpl.addRangeHighlighterAndChangeAttributes(MarkupModelImpl.java:158)
    at com.intellij.openapi.editor.impl.MarkupModelImpl.addRangeHighlighter(MarkupModelImpl.java:222)
    at io.flutter.perf.EditorPerfDecorations.addRangeHighlighter(EditorPerfDecorations.java:160)
    at io.flutter.perf.EditorPerfDecorations.setPerfInfo(EditorPerfDecorations.java:135)
    at io.flutter.perf.FlutterWidgetPerf.showReports(FlutterWidgetPerf.java:376)
    at io.flutter.perf.FlutterWidgetPerf.performRequest(FlutterWidgetPerf.java:358)
    at io.flutter.perf.FlutterWidgetPerf.lambda$requestRepaint$2(FlutterWidgetPerf.java:155)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
    at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
    at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
jwren commented 6 months ago

Dup of https://github.com/flutter/flutter-intellij/issues/7328