[GH-ISSUE #902] The app closes after a while #564

Closed
opened 2026-05-05 06:15:23 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @FezVrasta on GitHub (Jan 21, 2022).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/902

Before opening the issue, have you...?

  • Searched for existing issues
  • Looked through the wiki
  • Updated MonitorControl to the latest version (if applicable)

Describe the bug

After I start the app, it can work for days, but eventually it automatically closes without reporting any error.

Steps to reproduce

  1. Open the app
  2. Keep it open for days

Expected behavior

The app should never stop if not asked to

Anything else?

No response

Environment Information (please complete the following information)

- macOS version: Monterey
- Mac model: MBP 2021 M1 max
- MonitorControl version: 4.0.2
- Monitor(s): LG 34WK95U
- Apple Silicon/M1 (yes or no): yes
Originally created by @FezVrasta on GitHub (Jan 21, 2022). Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/902 ### Before opening the issue, have you...? - [X] Searched for existing issues - [X] Looked through [the wiki](https://github.com/MonitorControl/MonitorControl/wiki) - [X] Updated MonitorControl to the latest version (if applicable) ### Describe the bug After I start the app, it can work for days, but eventually it automatically closes without reporting any error. ### Steps to reproduce 1. Open the app 2. Keep it open for days ### Expected behavior The app should never stop if not asked to ### Anything else? _No response_ ### Environment Information (please complete the following information) ```markdown - macOS version: Monterey - Mac model: MBP 2021 M1 max - MonitorControl version: 4.0.2 - Monitor(s): LG 34WK95U - Apple Silicon/M1 (yes or no): yes ```
Author
Owner

@waydabber commented on GitHub (Jan 24, 2022):

It should not stop indeed. Probably something is messed up and is crashed. Might need some console/crash logs to see what happens. https://support.apple.com/guide/console/reports-cnsl664be99a/mac

<!-- gh-comment-id:1020545013 --> @waydabber commented on GitHub (Jan 24, 2022): It should not stop indeed. Probably something is messed up and is crashed. Might need some console/crash logs to see what happens. https://support.apple.com/guide/console/reports-cnsl664be99a/mac
Author
Owner

@FezVrasta commented on GitHub (Jan 28, 2022):

Here there are 3 crash reports

Archive.zip

<!-- gh-comment-id:1024643472 --> @FezVrasta commented on GitHub (Jan 28, 2022): Here there are 3 crash reports [Archive.zip](https://github.com/MonitorControl/MonitorControl/files/7961889/Archive.zip)
Author
Owner

@waydabber commented on GitHub (Feb 1, 2022):

Indeed, there seems to be a recurring issue on this config. The exception type seems to indicate that somehow the crash is intentional as some circumstance arises when the system thinks it would not be prudent to continue.

Do you have XCode? The best would be to pull the code and run the app from XCode and wait for the crash to occur - when it does, XCode will show where the crash is happening and what are the circumstances as the exact reason is not apparent from the crash file unfortunately.

<!-- gh-comment-id:1026905118 --> @waydabber commented on GitHub (Feb 1, 2022): Indeed, there seems to be a recurring issue on this config. The exception type seems to indicate that somehow the crash is intentional as some circumstance arises when the system thinks it would not be prudent to continue. Do you have XCode? The best would be to pull the code and run the app from XCode and wait for the crash to occur - when it does, XCode will show where the crash is happening and what are the circumstances as the exact reason is not apparent from the crash file unfortunately.
Author
Owner

@FezVrasta commented on GitHub (Feb 1, 2022):

Thanks for the investigation, I do have XCode but I never used it, also, considered it can take days before the app crashes it would mean I would have to run that behemoth of an IDE for way too long 😢

Do you think you could improve the logging so that the next time it crashes more useful logs will be generated?

<!-- gh-comment-id:1026918962 --> @FezVrasta commented on GitHub (Feb 1, 2022): Thanks for the investigation, I do have XCode but I never used it, also, considered it can take days before the app crashes it would mean I would have to run that behemoth of an IDE for way too long 😢 Do you think you could improve the logging so that the next time it crashes more useful logs will be generated?
Author
Owner

@FezVrasta commented on GitHub (Feb 1, 2022):

Just for completeness, for now I found a workaround:

Add this to ~/Library/LaunchAgents/MonitorControl.restart.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>RunAtLoad</key>
    <true />
    <key>KeepAlive</key>
    <true />
    <key>Label</key>
    <string>MonitorControl.restart</string>
    <key>ProgramArguments</key>
    <array>
      <string>/Applications/MonitorControl.app/Contents/MacOS/MonitorControl</string>
    </array>
  </dict>
</plist>

Then enable it with launchctl load ~/Library/LaunchAgents/MonitorControl.restart.plist

This way anytime the app crashes it's automatically restarted.

<!-- gh-comment-id:1026924937 --> @FezVrasta commented on GitHub (Feb 1, 2022): Just for completeness, for now I found a workaround: Add this to `~/Library/LaunchAgents/MonitorControl.restart.plist` ```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>RunAtLoad</key> <true /> <key>KeepAlive</key> <true /> <key>Label</key> <string>MonitorControl.restart</string> <key>ProgramArguments</key> <array> <string>/Applications/MonitorControl.app/Contents/MacOS/MonitorControl</string> </array> </dict> </plist> ``` Then enable it with `launchctl load ~/Library/LaunchAgents/MonitorControl.restart.plist` This way anytime the app crashes it's automatically restarted.
Author
Owner

@waydabber commented on GitHub (Feb 1, 2022):

Nice solution. :)

Well you might gather more info on what is happening by checking the console and see if MontiorControl was trying to do something in particular:

https://github.com/MonitorControl/MonitorControl/discussions/851

To make a crash report more helpful we'd need to symbolicate it. It might be that @JoniVR can do this as he built the actual release version and he might have the release in his XCode Organizer preserved. If not, then the crash logs are not very useful anymore as for symbolication you need the original dSYM file which contains the required info for debugging and figuring out what's what in the crash log. But if not, then you can do it as well (you do not have to run XCode continually, just need XCode to build the app and then use it to make the crash log human readable afterwards, for a quick tutorial see this: https://daveceddia.com/manually-symbolicate-crash-log-macos-app/), or we can build a new version and then wait for it to crash on your mac and then check the crash log against that version.

<!-- gh-comment-id:1026935158 --> @waydabber commented on GitHub (Feb 1, 2022): Nice solution. :) Well you might gather more info on what is happening by checking the console and see if MontiorControl was trying to do something in particular: https://github.com/MonitorControl/MonitorControl/discussions/851 To make a crash report more helpful we'd need to symbolicate it. It might be that @JoniVR can do this as he built the actual release version and he might have the release in his XCode Organizer preserved. If not, then the crash logs are not very useful anymore as for symbolication you need the original dSYM file which contains the required info for debugging and figuring out what's what in the crash log. But if not, then you can do it as well (you do not have to run XCode continually, just need XCode to build the app and then use it to make the crash log human readable afterwards, for a quick tutorial see this: https://daveceddia.com/manually-symbolicate-crash-log-macos-app/), or we can build a new version and then wait for it to crash on your mac and then check the crash log against that version.
Author
Owner

@waydabber commented on GitHub (Feb 23, 2022):

I'll close this one due to inactivity. If there is any new info please let me know!

<!-- gh-comment-id:1048563953 --> @waydabber commented on GitHub (Feb 23, 2022): I'll close this one due to inactivity. If there is any new info please let me know!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/MonitorControl#564
No description provided.