You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash when switching display mode from dark to light on >= 1.5.1 #578
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
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.
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
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.
Activity
tagliala commentedon Aug 20, 2026
AI-assisted investigation summary
The strongest candidate is 30230886, titled "Fix NSInvalidArgumentException: implement registerObserverForAppearanceChanges in Objective-C".
Why it stands out:
effectiveAppearanceonNSApplication.observeValueForKeyPath:ofObject:change:context:implementation in the same appearance helper path.A related precursor is 39e19941, titled "Set up Swift/ObjC interop".
An older comparison point is ba2b2caf, titled "Consolidate the Dark mode low-level helpers".
From the crash log and source review, 30230886 is the first commit I would inspect closely as the likely source of the regression.
hannesa2 commentedon Aug 20, 2026
When you know what's the issue, then please make a pull request. I'll merge it
tagliala commentedon Aug 20, 2026
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
tagliala commentedon Sep 14, 2026
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.
goneng commentedon Sep 14, 2026
sure, give it a try - thanks!
(ping me when you have something)
Fix crash on appearance change