Skip to content

Unexpected error with message Cannot read properties of undefined (reading 'chunkSize') #4456

Closed

Description

@alexa-poruch-2025

Description

Unexpected renderer process error.

Minimal Reprouducible Markdown Example (or Steps)

Stack Trace

TypeError: Cannot read properties of undefined (reading 'chunkSize')
    at lineNo (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:152496:38)
    at buildLineContent (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:153354:80)
    at getLineContent (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:153781:16)
    at buildLineElement (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:153878:21)
    at patchDisplay (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:155956:24)
    at updateDisplayIfNeeded (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:155879:9)
    at endOperation_W1 (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:155569:48)
    at endOperations (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:155547:11)
    at file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:155537:13
    at finishOperation (file:///app/marktext/resources/app.asar/out/renderer/assets/index-ClkWA0Ji.js:153695:11)

Version

MarkText: v0.19.0
Operating system: Linux x64 7.0.0-15-generic (linux)

Activity

  1. Jocs commented on Jun 24, 2026

    @Jocs
    Member

    Thanks for the report. This stack hits CodeMirror 5 document-tree internals (lineNo / chunkSize), which fire when CodeMirror's internal line model gets out of sync.

    The WYSIWYG editor no longer embeds CodeMirror — it migrated to @muyajs/core (Prism + a custom inline lexer + snabbdom), so the old embedded-code-block crash path is gone. However, the source-code editing mode still uses CodeMirror 5, so this crash is not fully eliminated and can still occur there.

    I couldn't reproduce it or pin a specific defect from the stack alone (no steps attached). To move this forward, could you share:

    • Were you in source-code mode or the normal WYSIWYG editor when it happened?
    • Any steps or a markdown sample that triggers it?
  2. reopened this on Jun 24, 2026
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