vydd / sketch

A Common Lisp framework for the creation of electronic art, visual design, game prototyping, game making, computer graphics, exploration of human-computer interaction, and more.
MIT License
1.4k stars 67 forks source link

Cant run examples, blank screen with SDL Error #40

Closed hunar1997 closed 10 months ago

hunar1997 commented 3 years ago

Hello

I wanted to check out this project, installed the dependencies and i got this:

(ql:quickload :sketch-examples)
To load "sketch-examples":
  Load 1 ASDF system:
    sketch-examples
; Loading "sketch-examples"

(:SKETCH-EXAMPLES)
(make-instance 'sketch-examples:sinewave)

debugger invoked on a SDL2::SDL-RC-ERROR in thread
#<THREAD "SDL2 Main Thread" RUNNING {1001CA72C3}>:
  SDL Error (-1): That operation is not supported

The current thread is not at the foreground,
SB-THREAD:RELEASE-FOREGROUND has to be called in #<SB-THREAD:THREAD "main thread" RUNNING {1004DE01F3}>

I don't know what to do from here :(

vydd commented 1 year ago

Hey, what's your system setup?

nate-sys commented 10 months ago

I have this exact same problem.

$ ros version
roswell 22.12.14.113(NO-GIT-REVISION)
build with cc (GCC) 12.2.0
libcurl=7.87.0
Quicklisp=2021-02-13
Dist=2023-06-18
lispdir='/etc/roswell/'
homedir='/home/nate/.roswell/'
sbcl-bin-variant=''

$ ros run
* (ql:quickload :sketch-examples)
To load "sketch-examples":
  Load 1 ASDF system:
    sketch-examples
; Loading "sketch-examples"
..................................................
[package sketch-examples]......
(:SKETCH-EXAMPLES)
* (make-instance 'sketch-examples:sinewave)

debugger invoked on a SDL2::SDL-RC-ERROR in thread
#<THREAD tid=12742 "SDL2 Main Thread" RUNNING {10045708F3}>:
  SDL Error (-1): That operation is not supported

The current thread is not at the foreground,
SB-THREAD:RELEASE-FOREGROUND has to be called in #<SB-THREAD:THREAD tid=11947 "main thread" RUNNING {10013E0003}>
for this thread to enter the debugger.

I'm on Void Linux and have SDL2 and all other dependencies installed.

Gleefre commented 10 months ago

I have encountered a similar error today and supposedly the culprit is sdl2:gl-set-swap-interval.

@nate-sys I have pushed a workaround disabling it onto the master branch of my fork: https://github.com/Gleefre/sketch ; could you try running examples with that version?

(Commit: https://github.com/vydd/sketch/commit/91d18187c5ebd9563451b6f3ca434eb5c5de3bf2)

nate-sys commented 10 months ago

@Gleefre Yup, that works.