Skip to content

Unexpected error with message #4117

Closed
Closed

Description

@javierruizorg

Description

Unexpected renderer process error.

Stack Trace

TypeError: Cannot destructure property 'text' of 'anchorBlock' as it is null.
    at ContentState2.getMuyaIndexCursor (file:///Applications/marktext%202.app/Contents/Resources/app.asar/out/renderer/assets/index-CDtNiKJ8.js:144078:19)
    at Muya.dispatchChange (file:///Applications/marktext%202.app/Contents/Resources/app.asar/out/renderer/assets/index-CDtNiKJ8.js:145884:47)
    at file:///Applications/marktext%202.app/Contents/Resources/app.asar/out/renderer/assets/index-CDtNiKJ8.js:145240:21

Version

MarkText: v0.18.4
Operating system: Darwin arm64 25.2.0 (darwin)

Activity

  1. added
    🐛 bug
    🐞 pri/critical
    🍏 platform/macOS
    on May 13, 2026
  2. Jocs commented on May 23, 2026

    @Jocs
    Member

    Closing — this was fixed during the electron-vite refactor (commit 85607dd).

    The guard at src/muya/lib/utils/importMarkdown.js:464-467 short-circuits when anchorBlock or focusBlock is null:

    if (!anchorBlock || !focusBlock) {
      console.warn('Can not find anchor block or focus block in getMuyaIndexCursor')
      return null
    }

    The destructuring statement that crashed in your stack trace can no longer execute with a null operand. General-editor regression coverage was also expanded in #4268.

    If you still hit this crash on a 0.18.5+ build, please reopen with the exact version and steps.

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

    🍏 platform/macOS🐛 bug🐞 pri/critical🔭 area/muya

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions