AppFlowy-IO / AppFlowy-IO/AppFlowy

[Bug] After certain operations, the editor will enter a stuck state.

Open
#4,763 2 comments 0 reactions 1 assignee Assigned to @LucasXu0 View on GitHub
bug editor
Dominant language
Dart
Stars
76.6k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### Bug Description

[ +2 ms] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (end): Invalid value: Not in inclusive range 14..20: 6
[ ] #0 RangeError.checkValidRange (dart:core/errors.dart:364:9)
[ ] #1 _StringBase.substring (dart:core-patch/string_patch.dart:413:27)
[ ] #2 _OpIterator.next (package:appflowy_editor/src/core/document/text_delta.dart:591:23)
[ ] #3 Delta.compose (package:appflowy_editor/src/core/document/text_delta.dart:277:33)
[ ] #4 TextTransaction.compose. (package:appflowy_editor/src/core/transform/transaction.dart:569:59)
[ ] #5 ListBase.fold (dart:collection/list.dart:202:22)
[ ] #6 TextTransaction.compose (package:appflowy_editor/src/core/transform/transaction.dart:569:22)
[ ] #7 Transaction.operations (package:appflowy_editor/src/core/transform/transaction.dart:23:7)
[ ] #8 EditorState.apply (package:appflowy_editor/src/editor_state.dart:286:41)
[ ] #9 onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:110:22)
[ ]
[ ] #10 KeyboardServiceWidgetState.initState. (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:65:38)
[ ]
[ ] #11 NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:49:9)
[ ]
[ +1 ms] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (end): Invalid value: Not in inclusive range 14..20: 6
[ ] #0 RangeError.checkValidRange (dart:core/errors.dart:364:9)
[ ] #1 _StringBase.substring (dart:core-patch/string_patch.dart:413:27)
[ ] #2 _OpIterator.next (package:appflowy_editor/src/core/document/text_delta.dart:591:23)
[ ] #3 Delta.compose (package:appflowy_editor/src/core/document/text_delta.dart:277:33)
[ ] #4 TextTransaction.compose. (package:appflowy_editor/src/core/transform/transaction.dart:569:59)
[ ] #5 ListBase.fold (dart:collection/list.dart:202:22)
[ ] #6 TextTransaction.compose (package:appflowy_editor/src/core/transform/transaction.dart:569:22)
[ ] #7 Transaction.operations (package:appflowy_editor/src/core/transform/transaction.dart:23:7)
[ ] #8 EditorState.apply (package:appflowy_editor/src/editor_state.dart:286:41)
[ ] #9 onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:110:22)
[ ]
[ ] #10 KeyboardServiceWidgetState.initState. (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:65:38)
[ ]
[ ] #11 NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:49:9)
[ ]

https://github.com/AppFlowy-IO/AppFlowy/assets/4517301/9f385462-3055-440f-9894-f7c117a2cc97

### How to Reproduce

After pressing the video operation, the editor reports an error and cannot continue typing.
demo{demo}{demo}->demo{demo}\\\_{demo}->demo\\\_{demo}\\_{demo}

### Expected Behavior

The editor is normal

### Operating System

desktop

### AppFlowy Version(s)

main

### Screenshots

_No response_

### Additional Context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.