mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #389] segfault on OSX when stopping barrier client or server via the gui #308
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#308
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jwestfall69 on GitHub (Aug 5, 2019).
Original GitHub issue: https://github.com/debauchee/barrier/issues/389
There is a segfault issue when stopping barrier via the gui in osx. This happens when running in either client or server mode. When the gui tells the client/server sub process to stop they segfault instead of exiting cleanly.
Operating Systems
OSX
Barrier Version
2.3.0, happens on older version as well.
Steps to reproduce bug
Other info
You can have a core file created by doing the following
$ ulimit -c unlimted
$ /path/to/Barrier.app/Contents/MacOS/barrier
I'm also pretty sure I looked at this a long time ago. As I recall the issue was related to events being added (EventQueue::addEventToBuffer) to the OSX (OSXEventQueueBuffer::addEvent) but the Cocoa app was already gone. I think the temp fix I did was in EventQueue::loop(), after the while() loop that exits on kQuit to set *m_readyCondVar = false. That way any new events will get queued in EventQueue itself and not added directly to the OS specific queue handler. If you go that route to fix, be sure to put a mutex around using *m_readyCondVar
@shymega commented on GitHub (Aug 5, 2019):
Thanks for this. Would you be able to provide a copy of the core file? Depending on size...
@jwestfall69 commented on GitHub (Aug 5, 2019):
I would prefer not to. Its 460M compressed / 1.6G uncompressed and its possible there could be sensitive data in it. Plus its trivial for anyone working on the issue with a mac to trigger the crash and debug it directly.
@shymega commented on GitHub (Aug 5, 2019):
Fair. I don't actually have a Mac, nor do I want to risk setting up a Hackintosh for obvious reasons. Without a core dump, it does make it hard to debug.
@jwestfall69 commented on GitHub (Aug 5, 2019):
Sorry. I don't have an osx dev environment setup anymore. I did find an old backup from when I was looking at the issue. This is the patch I had in my test branch.
Pretty sure that fixed it, but I never made a PR because I wasnt sure of the implications for windows/linux.
@shymega commented on GitHub (Aug 6, 2019):
Thanks! That helps, will take a look.