lispgames / cl-sdl2

Common Lisp bindings for SDL2 using C2FFI.
MIT License
304 stars 82 forks source link

Mac OS error when running example #128

Closed andi23rosca closed 4 years ago

andi23rosca commented 4 years ago

I followed the osx instructions in the readme and called the example with sdl2:make-this-thread-main but it still threw out the error SDL Error: NSWindow drag regions should only be invalidated on the Main Thread!

I'm using SBCL on the latest version of Catalina.

Works if I start from a terminal.

dop commented 4 years ago

Hey @andi23rosca, I assume that error is thrown when running using slime? Did you find other workaround than running from terminal?

andi23rosca commented 4 years ago

@dop Yeah i found a solution. Mentioned it in another issue but i'll copy paste it here:

It's cause slime is creating many threads. You can fix the issue by forcing swank to run in a single thread. What I've done is create the file ~/.swank.lisp and put in it

(setf swank:*communication-style* nil)

You could also just run that every time you restart your REPL but it's more convenient to put it in a file.