Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: App freezes when clicking on Calendars tab #762

Open
davidneedham opened this issue Sep 25, 2024 · 7 comments
Open

Bug: App freezes when clicking on Calendars tab #762

davidneedham opened this issue Sep 25, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@davidneedham
Copy link

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

  1. Go to MeetingBar Preferences
  2. Click on Calendars
  3. Beachball
  4. Open Activity Monitor to force quit MeetingBar
  5. Open Meeting Bar and 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)
@davidneedham davidneedham added the bug Something isn't working label Sep 25, 2024
@davidneedham
Copy link
Author

Related to #283 ?

Copy link

dosubot bot commented Sep 25, 2024

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:

  1. Update the timer to call loadCalendarList on a background thread:

    .onReceive(timer) { _ in 
        DispatchQueue.global(qos: .background).async {
            loadCalendarList()
        }
    }
  2. Modify the loadCalendarList function 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.

@davidneedham
Copy link
Author

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.

@davidneedham
Copy link
Author

@dosu is there any way to totally clear out app preferences from the CLI?

Copy link

dosubot bot commented Sep 25, 2024

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:

  1. Open Terminal.

  2. 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.

1 similar comment
Copy link

dosubot bot commented Sep 25, 2024

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:

  1. Open Terminal.

  2. 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.

@davidneedham
Copy link
Author

When I run that command the CLI returns Domain (com.leits.MeetingBar) not found.. I'll try something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants