lispgames / cl-sdl2

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

sdl2:init hangs on windows running on slime #116

Open A-deLuna opened 5 years ago

A-deLuna commented 5 years ago

I don't run into the issue when running SBCL directly from the command line, only when running through SLIME.

Tried switching to CCL but same problem.

I think issue is related to this line: https://github.com/lispgames/cl-sdl2/blob/a963ea57c7d43761f28314f0642fcae18fb51174/src/sdl2.lisp#L96

But I'm still a Lisp noob and don't know how to continue debugging.

Pasting backtrace hoping it helps:

0: (CCL::%PROCESS-WAIT-ON-SEMAPHORE-PTR #<A Foreign Pointer [gcable] #x1AB0> 16777215 0 "semaphore wait" NIL) 1: (WAIT-ON-SEMAPHORE #<SEMAPHORE #x21033C408D> NIL "semaphore wait") 2: (BORDEAUX-THREADS:CONDITION-WAIT #<SEMAPHORE #x21033C408D> #<RECURSIVE-LOCK "Anonymous lock" [ptr @ #xE7D640] #x21033C400D> :TIMEOUT NIL) 3: (TRIVIAL-CHANNELS:RECVMSG #S(TRIVIAL-CHANNELS:CHANNEL :QUEUE #S(TRIVIAL-CHANNELS.QUEUE:QUEUE :HEAD NIL :TAIL NIL) :Q-CONDITION #<SEMAPHORE #x21033C408D> :Q-MUTEX ...) NIL) Locals: CHANNEL = #S(TRIVIAL-CHANNELS:CHANNEL :QUEUE #S(TRIVIAL-CHANNELS.QUEUE:QUEUE :HEAD NIL :TAIL NIL) :Q-CONDITION #<SEMAPHORE #x21033C408D> :Q-MUTEX ...) TIMEOUT = NIL

:G121246 = #<LOCK-ACQUISITION [status = T] #x27370F0D>

    #:G121247 = #<RECURSIVE-LOCK "Anonymous lock" [ptr @ #xE7D640] #x21033C400D>

4: (SDL2:INIT) Locals: SDL-INIT-FLAGS = NIL

:FUN200433 = #<COMPILED-LEXICAL-CLOSURE (:INTERNAL SDL2:INIT) #x21033C410F>

    #:CHANNEL200434 = #S(TRIVIAL-CHANNELS:CHANNEL :QUEUE #S(TRIVIAL-CHANNELS.QUEUE:QUEUE :HEAD NIL :TAIL NIL) :Q-CONDITION #<SEMAPHORE #x21033C408D> :Q-MUTEX ...)

5: (CCL::CALL-CHECK-REGS SDL2:INIT)

A-deLuna commented 5 years ago

Also, I've only tried with 64 bit binaries of SBCL and CCL