Skip to content

Font-related editor crash #33

Description

@pszemraj

from a DM:

Initial Bug Report:
"hey, I just installed this and hit an issue: creating a new paste crashed the app, and it also crashed immediately on every relaunch after that. Not sure if I'm missing something here but I had Claude help me summarize our chat:

Environment

  • Version: v0.4.8
  • Platform: macOS [run 'sw_vers -productVersion' and fill in], Apple Silicon (macos-aarch64.dmg build)
  • Install location: ~/Applications (unsigned/unnotarized, launched via xattr -cr)

Observed behavior
Window opens and immediately closes. Running the binary directly from Terminal shows:
2026-07-15T15:54:17.209313Z INFO native GUI opened database at /Users/scastil4/cache/localpaste/db
thread 'main' panicked at /egui-0.33.3/src/style.rs:112:13:
Failed to find Name("Editor") in Style::text_styles. Available styles: [Small, Body, Monospace, Button, Heading]

Diagnosis steps taken

  • Confirmed no leftover localpaste processes were running (ps aux clean)
  • db.owner.lock was present but 0 bytes - ruled out stale-lock as the cause
  • Moved ~/.cache/localpaste/db aside and relaunched with a fresh empty DB – app launched fine. Confirms the crash is tied to something written during that first session, not the lock file or install location.
  • Likely cause: something about that paste's stored fields (maybe a language/style tag) makes the editor pane look up an "Editor" text style key on next launch, but that style key is never registered in Style::text_styles before the lookup runs."

Follow-up (Second Image Context):
"I installed the font and re-installed the app but still have the crashing issue unless I moved the wrong files to Font book? I moved the 3 .otf ones"


Bug Summary for Repository Maintenance

Issue: Application crashes immediately upon launch or when creating a new paste, and continues to crash on every subsequent relaunch.

Environment:

  • Version: v0.4.8
  • Platform: macOS (Apple Silicon / macos-aarch64.dmg build)
  • Installation: Unsigned/unnotarized, launched via xattr -cr.

Observed Behavior:

  • The application window opens and immediately closes.
  • Terminal output indicates a panic during GUI initialization: Failed to find Name("Editor") in Style::text_styles. Available styles: [Small, Body, Monospace, Button, Heading].

Troubleshooting Steps Taken:

  1. Process Check: Confirmed no leftover processes were running.
  2. Lock File Check: Confirmed db.owner.lock was present but empty (0 bytes), ruling out a stale lock.
  3. Database Isolation: Moved the existing database (~/.cache/localpaste/db) aside and relaunched with a fresh, empty database. Result: The app launched successfully, confirming the crash is related to data written during the initial session, not the installation path or lock file.
  4. Font Installation Attempt: The user attempted to resolve the issue by installing a specific font (suggested by external advice) and re-installing the app, but the crash persisted unless specific font files were moved to Font Book.

Hypothesized Root Cause:
The crash is likely caused by a data entry (specifically a language or style tag within a stored paste) that causes the editor pane to attempt to look up a style key named "Editor" during the next launch. This style key is not present in the application's registered Style::text_styles list before the lookup occurs, leading to a panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions