fix(qt): clean shutdown by using QueuedConnection and calling QApplication::quit#138
fix(qt): clean shutdown by using QueuedConnection and calling QApplication::quit#138solidv wants to merge 1 commit into
Conversation
|
|
@Kishi85 could you review? |
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Screenshot ComparisonPR #138 screenshots vs Matrix:
|
| Image | Baseline | PR |
|---|---|---|
tray_icon_initial.png |
||
tray_menu_checkbox_checked.png |
![]() |
![]() |
tray_menu_checkbox_unchecked.png |
![]() |
![]() |
tray_menu_shown.png |
![]() |
![]() |
tray_notification_displayed.png |
![]() |
![]() |
Matrix: macOS
| Image | Baseline | PR |
|---|---|---|
tray_icon_initial.png |
||
tray_menu_checkbox_checked.png |
![]() |
![]() |
tray_menu_checkbox_unchecked.png |
![]() |
![]() |
tray_menu_shown.png |
![]() |
![]() |
tray_notification_displayed.png |
![]() |
![]() |
|
Looking at the screenshots this breaks tests. If I'd have to guess that's because of that QApplication::exit(). From a logical standpoint the tray library is doing everything correct. It should not really have to shutdown QApplication (at least in QtTrayMenu class) as you could in theory use it in conjunction with other Qt stuff that might continue to run if you kill the tray itself. The main issue is Sunshine's hang detection (once again, same as for my async tray implementation going sideways) so I'm not even sure if we have to fix anything in tray or rather should fix the callback so that it disables hang detection upon shutting down sunshine to prevent it detecting a non-existent hang due to shutdown. I'll have to look at the issue and also Sunshine's exit action callback in detail but this is definitely a good pointer on what's going on due to explicitly changing the exit signal to QueuedConnection (instead of AutoConnection so it's forcefully run async without blocking) and adding an explicit QApplication::exit(). |
|
See LizardByte/Sunshine#5213 (comment) for a root analysis. UPDATE: UPDATE2: See #139 for a cleaner solution that only breaks the QtMainLoop when it was started during |







































Description
Used AI to fix the bug, i'm not a developer. Seems to be working fine. Hope this can help to analyze the root cause.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage