Skip to content

意外错误消息 #5106

Closed
Closed

Description

@zhaoyulonggt

Description

意外的渲染进程错误.

Minimal Reprouducible Markdown Example (or Steps)

Stack Trace

Error: Invalid offset - splits unicode bytes
    at unicount.strPosToUni (file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:99249:13)
    at exports2.dlen (file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:99332:70)
    at checkOp (file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:99281:26)
    at Object.apply (file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:99583:11)
    at drop2 (file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:146616:57)
    at Object.apply2 [as apply] (file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:146621:9)
    at JSONState._apply (file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:147289:44)
    at JSONState._flushOperationCache (file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:147442:10)
    at file:///D:/OfficeSoft/marktext-win-x64-0.20.0-rc.1/resources/app.asar/out/renderer/assets/index-D8Yzs57g.js:147422:12

Version

MarkText: v0.20.0-rc.1
Operating system: Windows_NT x64 10.0.19045 (win32)

Activity

  1. Jocs commented on Sep 14, 2026

    @Jocs
    Member

    Thanks for the report!

    Invalid offset - splits unicode bytes is the emoji deletion crash tracked in #4926. With the caret right after an emoji at the end of a paragraph (or just before inline markup such as **), Backspace removed only half of the emoji's UTF-16 surrogate pair. The editor's text operations can't encode that leftover half, so that edit and every edit after it threw this error. Depending on what came next, the stack ends in apply (the next Backspace) or in compose / xfBoundary (any later edit) — your stack is one of these.

    It is fixed on develop:

    The fixes will ship in the next release after v0.20.0-rc.2. If you still see this error on that release, please open a new issue with the steps (the text you were editing and the keys you pressed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions