Skip to content

意外错误消息 #4620

Closed
Closed

Description

@Corgile

Description

意外的渲染进程错误.

Minimal Reprouducible Markdown Example (or Steps)

插入plantuml

Stack Trace

TypeError: Cannot read properties of null (reading 'functionType')
    at ContentState2.updateCodeLanguage (file:///D:/Tools/MarkText/resources/app.asar/out/renderer/assets/index-B-PE276Q.js:131935:16)
    at ContentState2.selectLanguage (file:///D:/Tools/MarkText/resources/app.asar/out/renderer/assets/index-B-PE276Q.js:131924:10)
    at cb (file:///D:/Tools/MarkText/resources/app.asar/out/renderer/assets/index-B-PE276Q.js:143814:26)
    at CodePicker.selectItem (file:///D:/Tools/MarkText/resources/app.asar/out/renderer/assets/index-B-PE276Q.js:147560:5)
    at Object.click (file:///D:/Tools/MarkText/resources/app.asar/out/renderer/assets/index-B-PE276Q.js:148030:20)
    at invokeHandler (file:///D:/Tools/MarkText/resources/app.asar/out/renderer/assets/index-B-PE276Q.js:92222:13)
    at handleEvent (file:///D:/Tools/MarkText/resources/app.asar/out/renderer/assets/index-B-PE276Q.js:92233:5)
    at HTMLLIElement.handler (file:///D:/Tools/MarkText/resources/app.asar/out/renderer/assets/index-B-PE276Q.js:92238:5)

Version

MarkText: v0.19.1
Operating system: Windows_NT x64 10.0.19045 (win32)

Activity

  1. Jocs commented on Jun 22, 2026

    @Jocs
    Member

    Thank you for reporting this! The crash in updateCodeLanguage/selectLanguage (reading functionType on a null block) is caused by a stale DOM-to-block ID lookup in the old muyajs engine used in v0.17–0.19.

    This entire code path has been replaced in the upcoming release. The new @muyajs/core engine (which the next release ships) redesigned the code-block language selector from scratch: it holds a direct block reference instead of resolving a block by DOM ID, and the selectItem handler has an explicit null guard at the entry point, so the null-deref path cannot occur.

    If you are able to test a nightly or development build, we would appreciate a retest to confirm. Please reopen this issue if the crash persists on the new build.

  2. marked 意外错误消息 #5062 as a duplicate of this issue on Sep 10, 2026
  3. marked 意外错误消息 #5305 as a duplicate of this issue on Sep 13, 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