Skip to content

Crash when switching display mode from dark to light on >= 1.5.1 #578

Closed
tagliala/gitx
#3

Description

@tagliala

Hello,

I'm providing very few details to avoid information disclosure, but feel free to ask if you can't replicate or if you need more information.

I'm having this issue on 1.5.3 and 1.5.5 as well. If I recall correctly, it started with 1.5.1. I'm using gitx for a very long time and I do not recall this problem from earlier versions

How to replicate

  1. Open gitx
  2. Switch display mode to light mode/dark mode

Expected

Working

Actual

Crash

Initial Log

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process:             GitX [26109]
Path:                /Applications/GitX.app/Contents/MacOS/GitX
Identifier:          net.phere.GitX
Version:             1.5.5-HEAD (1.5.5.3170 [arm])
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           net.phere.GitX [29987]
User ID:             501

Date/Time:           2026-08-20 12:07:22.8956 +0200
Launch Time:         2026-08-20 12:07:19.6672 +0200
Hardware Model:      Mac17,9
OS Version:          macOS 26.6.1 (25G76)
Release Type:        User

Crash Reporter Key:  ---
Incident Identifier: ---

Sleep/Wake UUID:       ---

Time Awake Since Boot: 220000 seconds
Time Since Wake:       6935 seconds

System Integrity Protection: enabled

Triggered by Thread: 0, Dispatch Queue: com.apple.main-thread

Exception Type:    EXC_CRASH (SIGABRT)
Exception Codes:   0x0000000000000000, 0x0000000000000000

Activity

  1. tagliala commented on Aug 20, 2026

    @tagliala
    ContributorAuthor

    AI-assisted investigation summary

    The strongest candidate is 30230886, titled "Fix NSInvalidArgumentException: implement registerObserverForAppearanceChanges in Objective-C".

    Why it stands out:

    • It introduces the self-observing KVO setup for effectiveAppearance on NSApplication.
    • It also adds a custom observeValueForKeyPath:ofObject:change:context: implementation in the same appearance helper path.
    • The crash stack for the light/dark mode switch goes through AppKit appearance change handling, then KVO, then a GitX frame, which matches this implementation closely.

    A related precursor is 39e19941, titled "Set up Swift/ObjC interop".

    • This refactors the same appearance-helper area and appears to set up the code path that was later reimplemented in Objective-C by 3023088.

    An older comparison point is ba2b2caf, titled "Consolidate the Dark mode low-level helpers".

    • This is a useful baseline for the earlier appearance-change helper design before the later refactor/reimplementation.

    From the crash log and source review, 30230886 is the first commit I would inspect closely as the likely source of the regression.

  2. hannesa2 commented on Aug 20, 2026

    @hannesa2
    Contributor

    When you know what's the issue, then please make a pull request. I'll merge it

  3. tagliala commented on Aug 20, 2026

    @tagliala
    ContributorAuthor

    When you know what's the issue, then please make a pull request. I'll merge it

    Hello,

    Unfortunately I'm not an objective-c / swift developer. I don't know what the issue is, it is an AI assisted investigation I've performed on the crash log

    I do not have the tools at the moment to compile and test GitX, I've tried sometimes in the past without success.

    I can ask an AI agent to try to fix it, but if you may know the cause or replicate, maybe it will be much an easier fix for someone skilled

  4. tagliala commented on Sep 14, 2026

    @tagliala
    ContributorAuthor

    Hi @goneng,

    As a non-Objective-C / Swift developer, I asked my agents to work on this issue. They started making changes to the CSS, which surprised me.

    The fix didn't work. However, since #642 is actually changing CSS, it is possible that the issue is CSS-related, maybe I (as the AI) can continue exploring that path.

  5. goneng commented on Sep 14, 2026

    @goneng
    Collaborator

    sure, give it a try - thanks!
    (ping me when you have something)

  6. added a commit that references this issue on Sep 15, 2026
    26fc6bb
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