Skip to content

Unexpected error: Cannot read properties of null (reading 'isMinimized') #4137

Closed

Description

@JaekyungCho2140

Description

An unexpected error occurred in the main process.

Stack Trace

TypeError: Cannot read properties of null (reading 'isMinimized')
    at Xt.bringToFront (/Applications/MarkText.app/Contents/Resources/app.asar/dist/electron/main.js:2:251835)
    at Object.<anonymous> (/Applications/MarkText.app/Contents/Resources/app.asar/dist/electron/main.js:2:254332)
    at Object.onceWrapper (node:events:514:26)
    at Object.emit (node:events:406:35)

Version

MarkText: v0.17.1
Operating system: Darwin x64 25.3.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 in the main-process refactor.

    bringToFront in src/main/windows/base.ts:85 now short-circuits when the underlying BrowserWindow has been destroyed before the IPC handler fires:

    bringToFront(): void {
      const { browserWindow: win } = this
      if (!win) return
      ...
    }

    so the null isMinimized / webContents deref from your stack trace can no longer happen.

    If you still see this on a recent build, please reopen with the exact version and the window-management steps that triggered it.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions