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

Gloss issue on mac in rhine-bayes executable #212

Closed
reubenharry opened this issue Feb 17, 2023 · 5 comments
Closed

Gloss issue on mac in rhine-bayes executable #212

reubenharry opened this issue Feb 17, 2023 · 5 comments

Comments

@reubenharry
Copy link

If I do cabal run rhine-bayes-gloss inside the rhine-bayes dir, I get:

2023-02-17 10:48:57.893 rhine-bayes-gloss[3506:11456461] GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: NSWindow drag regions should only be invalidated on the Main Thread!

I recognize this as a Gloss issue for Mac (see e.g. https://www.reddit.com/r/haskell/comments/f59opw/error_when_trying_to_use_gloss_package/) and tried removing threaded from the .cabal file, but the error persisted.

There should be a simple fix (since I am able to run gloss in rhine-bayes-examples), but I'm not sure exactly what.

@turion
Copy link
Owner

turion commented Feb 24, 2023

There should be a simple fix (since I am able to run gloss in rhine-bayes-examples), but I'm not sure exactly what.

Can you say which example succeeds?

Also, can you run rhine-gloss-gears from rhine-gloss? There are different choices them, can you try each one?

@reubenharry
Copy link
Author

Both options for rhine-bayes-gloss fail. Option (3) for rhine-gloss-gears fails, but (1) and (2) succeed.

@turion
Copy link
Owner

turion commented Mar 6, 2023

Then I'm pretty certain that this is caused by forkIO. I think this is a known problem for MacOS + fork + OpenGL, but I don't know a solution. See e.g. turion/essence-of-live-coding-tutorial#3

@turion
Copy link
Owner

turion commented Mar 6, 2023

Can you try the suggestion from turion/essence-of-live-coding-tutorial#3 (comment) ?

@reubenharry
Copy link
Author

This didn't work, although for option (3) of rhine-gloss-gears, it produces a different behavior (hanging, instead of crashing). For rhine-bayes-gloss, it still crashed for both (1) and (2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants