Skip to content

v0.25: SIGTRAP crash opening Settings — assertionFailure in static NSBundle.module #891

@h3x89

Description

@h3x89

Description

After upgrading to v0.25 (build 60, commit 3e2545b2), opening Settings (or About) from the menu bar causes a reproducible EXC_BREAKPOINT / SIGTRAP crash. The app process terminates and the menu bar icon disappears.

Downgrading to v0.23 (build 58) resolves the issue immediately — no other changes needed (config preserved).

Environment

  • macOS: 26.4.1 (arm64)
  • CodexBar: 0.25 (build 60, 3e2545b2)
  • Machine: Apple Silicon (M1)

Stack Trace (top frames)

EXC_BREAKPOINT (SIGTRAP)
_assertionFailure(_:_:file:line:flags:)
closure #1 in variable initialization expression of static NSBundle.module
one-time initialization function for module
_dispatch_once_callout
localizedBundle()
closure #1 in closure #1 in PreferencesView.body.getter
...
PreferencesView.body.getter
...
AppWindowsController.showSettingsWindow(namespace:)
OpenSettingsAction.callAsFunction()
closure #1 in closure #1 in HiddenWindowView.body.getter

Full crash reports (4 .ips files) available on request.

Analysis

The crash happens during lazy initialization of static NSBundle.module, triggered when localizedBundle() is called from PreferencesView.body.getter. This suggests the Swift Package Manager resource bundle accessor (Bundle.module) assertion-fails inside its dispatch_once initializer.

The issue appears related to the new localization additions in v0.25 (#819 — Simplified Chinese + in-app language selector). The localizedBundle() function is new in v0.25 and its first call triggers the Bundle.module initialization which fails.

Attempted Workarounds (unsuccessful)

  1. defaults write com.steipete.codexbar AppleLanguages '("en")' — no effect
  2. Removing zh-Hans.lproj from the app bundle (requires sudo + re-sign) — not tested fully

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:install-distributionInstall, packaging, Homebrew, launch, binary detectionbugSomething isn't workingpriority:highHigh priority: confirmed serious bug or blocker

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions