2009-Nissan-Cube / About-This-Hack

Discover your hardware on macOS with this simple, user-friendly hardware info app that retains the beloved design language of the classic 'About This Mac' interface, while gaining access to a wealth of additional features.
MIT License
271 stars 22 forks source link

Storage tab info is empty sometimes at first launch #45

Closed perez987 closed 1 year ago

perez987 commented 1 year ago

Good morning, latest commit 2acddda runs really fast but I've noticed that, when I run the app, the first time that I go to the Storage tab it can be empty (only Startup Disk title, disk icon and storage bar). See image. I have to go to at least one other tab and go back to the Storage tab which, this second time, does show the expected information.

I attach build console messages (it happens also when running the compiled app), the lines starting with // are my own comments to make the text more readable.

As an extra info, the version before Optimized Code... Fasten up Project (build e78748e) does not have this issue although the app starts much slower (as expected).

Thanks for your work.

# Build console starts
2023-08-28 11:27:18.332744+0200 About This Hack[2560:26014] [NSToolbarItem] NSToolbarItem.minSize and NSToolbarItem.maxSize methods are deprecated. Usage may result in clipping of items. It is recommended to let the system measure the item automatically using constraints.
2023-08-28 11:27:18.332801+0200 About This Hack[2560:26014] [NSToolbarItem] NSToolbarItem.minSize and NSToolbarItem.maxSize methods are deprecated. Usage may result in clipping of items. It is recommended to let the system measure the item automatically using constraints.
2023-08-28 11:27:18.332830+0200 About This Hack[2560:26014] [NSToolbarItem] NSToolbarItem.minSize and NSToolbarItem.maxSize methods are deprecated. Usage may result in clipping of items. It is recommended to let the system measure the item automatically using constraints.
2023-08-28 11:27:18.383081+0200 About This Hack[2560:26014] [Nib Loading] Failed to connect (segCtrl) outlet from (About_This_Hack.WindowController) to (NSToolbarItem): missing setter or instance variable
mkdir: /Users/yo/.ath: File exists
Directory created...
Files created...
13.5.1

RAM Type: DDR4

RAM Speed: 2133 MHz
loaded
2023-08-28 11:27:18.505267+0200 About This Hack[2560:26014] [Nib Loading] Failed to connect (osPrefix) outlet from (About_This_Hack.ViewControllerStorage) to (NSTextField): missing setter or instance variable
2023-08-28 11:27:18.507308+0200 About This Hack[2560:26014] [Nib Loading] Failed to connect (osPrefix) outlet from (About_This_Hack.ViewControllerSupport) to (NSTextField): missing setter or instance variable
Support View Initializing...
2023-08-28 11:27:18.510465+0200 About This Hack[2560:26014] [NSToolbarItem] NSToolbarItem.minSize and NSToolbarItem.maxSize methods are deprecated. Usage may result in clipping of items. It is recommended to let the system measure the item automatically using constraints.
2023-08-28 11:27:18.510503+0200 About This Hack[2560:26014] [NSToolbarItem] NSToolbarItem.minSize and NSToolbarItem.maxSize methods are deprecated. Usage may result in clipping of items. It is recommended to let the system measure the item automatically using constraints.
2023-08-28 11:27:18.525375+0200 About This Hack[2560:26014] [Window] Warning: Window NSWindow 0x7fb3f1004e40 ordered front from a non-active application and may order beneath the active application's windows.
Initializing...

// Main window opens
RAM Type: DDR4
RAM Speed: 2133 MHz
["AMD Radeon RX 6600 XT"]
1

// Switch to Storage tab
switched
Storage View Initializing...
Startup Disk Name macOS13R
// Storage tab info empty

// Switch to Display tab
switched
Display View Initializing
Startup Disk Name macOS13R
Number of Displays: 1
Has built-in display: false
Storage Type: true
Size: 499.9
Available: 368.3
%: 0.26325265053010594
Storage Data: macOS13R
499.9 GB (368.3 GB available)
Size: 499.9
Available: 368.3
%: 0.26325265053010594
Storage Percent: 0.26325265053010594

// Switch to Storage tab
switched
// This time, Storage tab info is ok
Storage View Initializing...
Startup Disk Name macOS13R
switched
Display View Initializing
Startup Disk Name macOS13R
Number of Displays: 1
Has built-in display: false
Storage Type: true
Size: 499.9
Available: 368.3
%: 0.26325265053010594
Storage Data: macOS13R
499.9 GB (368.3 GB available)
Size: 499.9
Available: 368.3
%: 0.26325265053010594
Storage Percent: 0.26325265053010594
switched
Storage View Initializing...
Startup Disk Name macOS13R

// Switch to General tab
switched

// Closing the app
Display View Initializing
2023-08-28 11:28:21.618388+0200 About This Hack[2560:27665] [client] No error handler for XPC error: Connection invalid
Storage tab
0xCUB3 commented 1 year ago

Thanks! I think the issue is that it takes a little bit of time for the data to load, so it sometimes takes a refresh of the tab to properly show the data. I will try to find a way to optimize the handler.

perez987 commented 1 year ago

Yes, I see in the console that storage data are loaded while switching to Display tab after leaving the empty Storage tab. Thanks.

0xCUB3 commented 1 year ago

Fixed in latest commit. Switching tabs should be much faster as well

perez987 commented 1 year ago

Thank you.