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

glfwInit causes crash on macOS 11 #24

Open
seanhenry opened this issue Jun 17, 2022 · 0 comments
Open

glfwInit causes crash on macOS 11 #24

seanhenry opened this issue Jun 17, 2022 · 0 comments

Comments

@seanhenry
Copy link

This issue is due to a bug in GLFW 3.3.5 rather than this repo but I thought it would be useful to document this here since the latest version points to GLFW 3.3.5. It took me a while to track down the issue so I hope this helps someone else figure out the problem quicker.

Device info

  • macOS 11 (Big Sur) or older - works fine on macOS 12 (Monterey)
  • tested on with Intel chip although I expect the issue exists on macs with arm chip

Steps to reproduce

  • Run app on macOS 11 (Big Sur) or older
  • Call glfwInit()

Expected behaviour

GLFW is initialised.

Actual behaviour

App crashes with the following stack trace:

Segmentation fault: 11

0 _glfwPollMonitorsNS
1 glfwPlatformInit
2 glfwInit

Workaround

Force 3.3.4 in your Cargo.toml:

[dependencies]
glfw = "=0.44.0"
glfw-sys = "=3.3.4"

Fix

I think this issue has been fixed in GLFW 3.3.6. According to the release notes:

[Cocoa] Bugfix: A dependency on an external constant caused crashes on macOS 11 and earlier (glfw#1985,glfw#1994)

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

No branches or pull requests

1 participant