Skip to content

Linux/Electron bootstrap leaves renderer stuck on splash because renderer globals and font loading are fragile #820

Description

@MauricioMCunha

Summary

On a current Linux desktop, running the current master branch can leave Pencil stuck on the splash screen.

The main window opens, but the UI is never mounted. The renderer keeps the raw <ui:ApplicationPane .../> node in the DOM instead of materializing the application view.

Environment

  • OS: Linux
  • Branch tested: master
  • Commit tested: 7d0ec3d
  • Electron from project dependencies

Reproduction

  1. Clone evolus/pencil
  2. Run npm install at repository root
  3. Run npm install inside app/
  4. Start the app

Observed behavior

  • Splash stays visible
  • Main UI is not mounted
  • Renderer throws cascading exceptions

Exceptions observed

Representative failures observed during renderer startup:

  • missing renderer globals used by classic scripts, such as fs, path, remote
  • font loading path using document.fonts in a way that does not complete reliably on current Electron/Chromium
  • FontLoader.systemRepo being read before it is initialized

Examples from runtime inspection:

  • TypeError: Cannot read properties of undefined (reading 'faces')
  • TypeError: Cannot read properties of undefined (reading 'fonts')

Notes

This seems to be a combination of:

  1. renderer bootstrap relying on globals that are no longer implicitly shared the way the rest of the code expects
  2. fragile font-loading bootstrap
  3. FontLoader assuming systemRepo is already available

I have a local patch that reduces this to a small set of changes in:

  • app/app.js
  • app/pencil-core/common/FontLoader.js
  • app/pencil-core/common/FontLoaderUtil.js

If useful, I can turn that into a focused PR.

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