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

Running lwjgl.main/-main crashes nREPL #56

Closed
zikajk opened this issue Nov 19, 2020 · 2 comments
Closed

Running lwjgl.main/-main crashes nREPL #56

zikajk opened this issue Nov 19, 2020 · 2 comments

Comments

@zikajk
Copy link

zikajk commented Nov 19, 2020

Is it possible to work with Skija from Clojure nRepl?
I tried to run (-main) from your example and it crashes the Repl in Emacs (Cider) on MacOS.
Running by scripts/run.sh works fine though.

lwjgl.main> (-main)

*** Closed on Thu Nov 19 13:19:47 2020 ***
@tonsky
Copy link
Collaborator

tonsky commented Nov 19, 2020

Yeah, the trick with GUI apps on macOS is that all UI stuff has to be done from the first thread (create window, etc). That’s why the script passes -XstartOnFirstThread to the JVM.

The problem with Repls, I assume, is that they create their own threads for handling most operations. It is possible to start GUI app, create windows and then create thread for repl. But it’s not how the defaults are set up, I guess.

@stathissideris
Copy link

stathissideris commented Nov 27, 2020

I found a similar issue rogerallen/hello_lwjgl#6 and the commit that implements a workaround that allows working with nREPL rogerallen/hello_lwjgl@a7fcace. Not sure what would be the most appropriate way to integrate it into the Clojure example, but it looks like a promising direction.

@tonsky tonsky closed this as completed Nov 27, 2020
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

3 participants