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

Restart the application bundle instead of the underlying executable when crashing on macOS #3268

Merged
merged 2 commits into from Oct 2, 2021
Merged

Restart the application bundle instead of the underlying executable when crashing on macOS #3268

merged 2 commits into from Oct 2, 2021

Conversation

LosFarmosCTL
Copy link
Contributor

@LosFarmosCTL LosFarmosCTL commented Oct 2, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

On macOS, programs are contained in ".app" application bundles. When chatterino restarts on a crash, it currently just looks for the executable path obtained via QApplication::applicationFilePath() and starts that again, which for macOS is the underlying unix executable inside of the application bundle. Unfortunately, for macOS those 2 are absolutely different, resulting in i.e. a second chatterino icon being added to the dock, due to the OS not recognizing that it is the same application.

This PR changes the restart logic for macOS to use Apples CoreFoundation API to get the path of the application bundle, and open this using the built-in "open" command. For every other OS, just starting the executable directly is, at least afaik, perfectly fine.

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a Bugfix: changelog entry

@pajlada pajlada enabled auto-merge (squash) October 2, 2021 10:44
@pajlada pajlada merged commit acc573a into Chatterino:master Oct 2, 2021
zneix added a commit to SevenTV/chatterino7 that referenced this pull request Oct 2, 2021
Now we're on commit 0ba7c0f; Changes from upstream we've pulled:

- Minor: Added highlights for first messages (Chatterino#3267)
- Bugfix: Fixed second chatterino icon appearing in the dock when restarting on a crash in macOS. (Chatterino#3268)
GabeEddyT pushed a commit to GabeEddyT/chatterino2 that referenced this pull request Oct 18, 2021
…ture/pronouns-7TV (#3)

* some CV paste

* It compiles!

* Ping API for Channel & Global Emotes

* Fetch 7TV emotes from current channel

* Fix 7TV tooltip

* Change project name & update server

* Revert "Change project name & update server"

This reverts commit 49d10be.

* Change update server

* 7TV API URL to HTTPS

* CI - update branch

* Add 7TV files to Makelist

* Auto-completion for 7TV Emotes

* chore: Fixed CI (#3)

* Fixed code formatting (#4)

* Fixed MessageElement flags (#2)

* Revert changes to BttvEmotes.cpp

* Fixed compilation when precompiled headers are disabled (Chatterino#9)

* Added timeout to NetworkRequests fetching emotes (Chatterino#20)

This should prevent certain emotes from failing to load.
Following the format we sorta established on upstream - 30 seconds for loadEmotes and 20 seconds for loadChannel.

* Implemented SevenTV badges (Chatterino#19)

Brings upstream up-to-date and implements all 7tv badges returned from badge endpoint.

* GraphQL query cleanup (Chatterino#21)

* corrected numbering in badge slot comments (Chatterino#26)

Slot 7 was used twice in comment

* Zerowidth Emotes (7TV) (Chatterino#36)

Co-authored-by: Tal Neoran <talneoran@gmail.com>
Co-authored-by: zneix <zneix@zneix.eu>

* Restart the application bundle instead of the underlying executable when crashing on macOS (Chatterino#3268)

On macOS, programs are contained in ".app" application bundles. When chatterino restarts on a crash, it currently just looks for the executable path obtained via QApplication::applicationFilePath() and starts that again, which for macOS is the underlying unix executable inside of the application bundle. Unfortunately, for macOS those 2 are absolutely different, resulting in i.e. a second chatterino icon being added to the dock, due to the OS not recognizing that it is the same application.

* Add highlights for first messages (Chatterino#3267)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>

* Ignore out of bounds check on tiling WMs (Chatterino#3270)

* Fix spacing of tab visibility keybind in keybindings page (Chatterino#3266)

Co-authored-by: Paweł <zneix@zneix.eu>

* Add missing arg to string format in user unblock error (Chatterino#3279)

Co-authored-by: Paweł <zneix@zneix.eu>

* Add keybindings to tab context menu items (Chatterino#3265)

Co-authored-by: Paweł <zneix@zneix.eu>

* Bump ilammy/msvc-dev-cmd from 1.9.0 to 1.10.0 (Chatterino#3276)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>

* Enable workflows for feature/pronouns-7TV

* Merge remote-tracking branch 'chatterino2' into feature/pronouns-7TV

We are now on 17f98cb but the relevant commit will likely change in the future when 7TV updates the changes from this past weekend

Co-authored-by: Anatole <me@anatole.dev>
Co-authored-by: Anatole <anatole@xiantis.net>
Co-authored-by: Paweł <zneix@zneix.eu>
Co-authored-by: TranRed <kupfer.nils@gmail.com>
Co-authored-by: Tal Neoran <talneoran@gmail.com>
Co-authored-by: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com>
Co-authored-by: gempir <gempir.dev@gmail.com>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Co-authored-by: Ckat <Ckat@teknik.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants