Bug: App freezes when clicking on Calendars tab
macOS version
Sequoia 15.0
MeetingBar version
4.10.0
Installation source
AppStore
Calendars provider
Google Calendar
Bug description
The app freezes (beachballs) when the Calendars tab is chosen from within Preferences. Every other tab and every other setting seems to work as expected.
I distinctly recall that this had been happening for awhile, then worked fine when I got a new computer, and is now beachballing again.
Reproduction steps
- Go to
MeetingBar Preferences - Click on
Calendars - Beachball
- Open
Activity Monitorto force quit MeetingBar - Open
Meeting Barand repeat from 1
Expected behavior
When I click the Calendars tab I'm able to select which calendars are used for MeetingBar.
Screenshots/screen recordings
No response
Additional context
Versions
- App version 4.10.0 (however it's been doing this for several versions)
- MacOS 15.0 (however it did this in the previous version too)
Related to #283 ?
Hey @davidneedham! I'm here to assist with bugs, questions, and contributions. Let's squash those bugs together! 🤖
The freezing issue when clicking on the Calendars tab in Preferences on macOS Sequoia 15.0 with Google Calendar as the provider is due to the loadCalendarList function being called on the main thread every second by a timer. This can cause the UI to freeze if the operation is time-consuming.
To fix this, you should move the loadCalendarList function to a background thread. Here is a possible solution:
-
Update the timer to call
loadCalendarListon a background thread:.onReceive(timer) { _ in DispatchQueue.global(qos: .background).async { loadCalendarList() } } -
Modify the
loadCalendarListfunction to update the UI on the main thread:func loadCalendarList() { let groupedCalendars = Dictionary(grouping: appDelegate!.statusBarItem.calendars) { $0.source } DispatchQueue.main.async { calendarsBySource = groupedCalendars } }
Additionally, ensure that the fetchAllCalendars method in the GCEventStore class handles network requests asynchronously to prevent UI blocking [1][2].
To continue talking to Dosu, mention @dosu.
I deleted the app and re-installed with Homebrew. When I loaded it up, all of my settings were retained and it still crashed on the calendars tab.
@dosu is there any way to totally clear out app preferences from the CLI?
To completely clear out app preferences from the CLI, you can use the defaults command to delete the preferences for MeetingBar. Here is how you can do it:
-
Open Terminal.
-
Run the following command to delete the preferences:
defaults delete com.leits.MeetingBar
This command will remove all stored preferences for MeetingBar, effectively resetting the app to its default state. After running this command, you can restart MeetingBar and see if the issue persists.
To continue talking to Dosu, mention @dosu.
To completely clear out app preferences from the CLI, you can use the defaults command to delete the preferences for MeetingBar. Here is how you can do it:
-
Open Terminal.
-
Run the following command to delete the preferences:
defaults delete com.leits.MeetingBar
This command will remove all stored preferences for MeetingBar, effectively resetting the app to its default state. After running this command, you can restart MeetingBar and see if the issue persists.
To continue talking to Dosu, mention @dosu.
When I run that command the CLI returns Domain (com.leits.MeetingBar) not found.. I'll try something else.
Hi folks, Thanks again for reporting this performance issue. I’ve just published a 4.11 beta release with a number of under-the-hood performance optimizations in MeetingBar. You can grab it here: https://github.com/leits/MeetingBar/releases/tag/v4.11.beta
Once you’ve had a chance to try it, could you please let me know whether you still see the issues? Any logs, profiled timings, or specific repro steps you can share will be super helpful. Thanks!
GitHub
Release v4.11 (beta) · leits/MeetingBarThis is a pre-release. I rewrote half of the app to improve stability and performance. What's ChangedTranslations update from Hosted Weblate by @weblate in #738 Translations update from Hosted We...
Thanks for reporting. The bug fix has been released! Feel free to reopen the issue if the error still occurs.