-
Notifications
You must be signed in to change notification settings - Fork 52
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
REPL Crash on Second Start #356
Comments
Which OS and Lisp implementation are you using? I just tested with SLIME/SBCL on macOS and here it works fine. The Lisp can be restarted with |
Oh I forgot to mention that, I am using Linux, and SBCL here is the details:
I didn't know about the Thanks for the reply. |
Just making it clear that it still doesn't work as expected. :) |
Thanks for clarifying that it's still not working. I wasn't sure. :)
Note:
Everything makes a difference. We're dealing with computers here. ;) CEPL is relying on quite many things in the system to work. |
Thanks for replying.
In your Note:
I actually used those steps. I copied from the REPL and double checked it by restarting and typing in those same steps. I tried both,
Yes here is the new Step 6: I totally agree with the last paragraph and most of my projects depend severely on CEPL. I love it too much. Thanks for cooperating. :) |
Just another reminder that my problem isn't fixed. Am I not giving some information, please say so, I am sorry if that is the case. If my problem is fixed I will definitely state it. Thanks for your cooperation and I hope I am not a trouble. |
No trouble. Pardon the delay. I'm still using macOS mainly, so couldn't test on Linux yet. Do you have the CEPL repositories cloned locally, or are you using the ones that Quicklisp downloads automagically? Anyway, I would first test the system this way to make sure it works without SLIME: cd ~/quicklisp/local-projects/
git clone https://github.com/cbaggers/cepl.examples
sbcl --eval '(ql:register-local-projects)' --quit While in grep cepl.examples system-index.txt and check that Now cd ~/quicklisp/local-projects/cepl.examples/
sbcl --no-sysinit --no-userinit \
--load ~/quicklisp/setup.lisp \
--eval '(ql:quickload :cepl.examples)' \
--load examples/game-of-life.lisp \
--eval '(cepl:repl)' \
--eval '(cepl.examples::run-loop)' \
--quit should run the example fine. Twice. ;) This is also a useful test: sbcl --no-sysinit --no-userinit \
--load ~/quicklisp/setup.lisp \
--eval '(ql:quickload :cepl.examples)' \
--load pre-release-run.lisp \
--eval '(cepl:repl 800 600)' \
--eval '(cepl.examples::run-em-all)' To try to expose your issue, I would run this twice. If that works – and can be run twice without problems – the next step would be to try with init-files: sbcl \
--eval '(ql:quickload :cepl.examples)' \
--load examples/game-of-life.lisp \
--eval '(cepl:repl)' \
--eval '(cepl.examples::run-loop)' and sbcl \
--eval '(ql:quickload :cepl.examples)' \
--load pre-release-run.lisp \
--eval '(cepl:repl 800 600)' \
--eval '(cepl.examples::run-em-all)' If all this works, then I'd start SLIME and hopefully it will work the same. Also twice. |
I used quicklisp and didn't clone it locally. cd ~/quicklisp/local-projects/
git clone https://github.com/cbaggers/cepl.examples
sbcl --eval '(ql:register-local-projects)' --quit This ran successfully. Here is the grep output: $ pwd
/home/saba/quicklisp/local-projects
$ grep cepl.examples system-index.txt
cepl.examples/cepl.examples.asd Runnning: cd ~/quicklisp/local-projects/cepl.examples/
sbcl --no-sysinit --no-userinit \
--load ~/quicklisp/setup.lisp \
--eval '(ql:quickload :cepl.examples)' \
--load examples/game-of-life.lisp \
--eval '(cepl:repl)' \
--eval '(cepl.examples::run-loop)' \
--quit Gave me a CEPL:REPL window that showed up again not drawing anything and having the same symptoms as before. Although we have new information in the terminal, this shows up: Running it a second time, yielded successfull results. A window running the game-of-life example as it should! This was the last time I saw anything properly rendered onto the CEPL:REPL screen. I ran all of the examples after that atleast 3-4 times. All of them produced the same output and the same window as shown in the picture above (They didn't work). Atleast we now (hopefully) know a bit more about the issue. Thanks. Regards, |
(When there's text output, it's nice to paste only the text, because then one can copy from it.) Looks like it's neither CEPL nor SBCL causing the problem. Apparently the problem appears quite randomly for others as well. Seems to be time for a system upgrade. ;) When running in SLIME, the error is probably also shown in the Time to enjoy some CEPL! |
Sorry, will keep that in mind for next time. $ cat /etc/os-release
NAME="void"
ID="void"
DISTRIB_ID="void"
PRETTY_NAME="void" Here is my version of libX11 and it's deps (dependencies):
I updated my system, restarted it and it still produces the same result. libX11 and deps are the same version meaning they aren't updated. Maybe I have to wait for it to be the latest version on Void Linux or I could build from source? So still no time to enjoy CEPL... :( |
Hello, Hope you are well,
Maybe this is of help to you? Thanks for the help and I hope we could solve this together,as if we don't, I will have to use cl-opengl and create my projects from scratch with that, which is quite a bigger pain since I know that CEPL exists. Regards, |
I have a suspicion that Might be an idea to run the mkdir build; cd build; cmake .. -DSDL_TEST=1; make to build the tests. On my system I had to add
in
Most likely we can rule out both CEPL and SBCL as the cause. |
Wow, all of the SDL Examples/tests work perfectly fine! To test (ql:quickload :cl-opengl)
(ql:quickload :cl-glut)
(ql:quickload :cl-glu) I did a Yay! It worked! I tried this on almost all examples, all of the ones I tried, worked flawlessly. What can we rule down?
Would you look at that, we narrowed CEPL down as the verdict (atleast as far as I can think). This session boosted my motivation a little further as atleast I could see a window popup. Now the question would be where CEPL is going wrong. Thanks for your cooperation. |
I can try with a It's good if you take note of any error messages that appear. |
All the CEPL examples run fine on Funtoo Linux here. |
Maybe you could try Void Linux at some point? |
Also, that version of libX11 is really old. Maybe try it with a newer version? Even on Funtoo. |
Hello. Any update trying it on Void Linux? It certainly works with other distros. |
Tried on Artix Linux. Same results. |
I have also encountered the problem when using Funtoo, and have a solution in sight. |
Yayyyyy, hope to hear from you soon! I hope I can reward everyone's effort with my application! Thanks, for cooperation. Regards. |
Any update? My project is still held up. Thanks for your effort. |
@metayan thanks so much for looking into this in my absence. Feel free to braindump your findings on me and I'll try to continue your excellent work |
Hello, @baggers-br, Regards, |
My investigations led me to the value of When the issue appeared on my Linux system, I tried to only set a few of the bits in At the moment I can't reproduce the issue on my Linux system - both CEPL and the cl-sdl2 examples run fine here. It's still a mystery to me what underlying circumstances cause the issue to appear. An idea is the version of the installed SDL2. I have tried both 2.0.10 and 2.0.18.1 (fresh build) now, but I'm somewhat sure that both were causing trouble before, but not 100% certain. @hamzashahid-blit : If you still have the issue with your system, I suggest trying to tweak the definition of (logior sdl2-ffi:+sdl-init-events+
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
;; sdl2-ffi:+sdl-init-gamecontroller+
;; sdl2-ffi:+sdl-init-joystick+
;; sdl2-ffi:+sdl-init-haptic+
;; sdl2-ffi:+sdl-init-sensor+
) and playing around with different combinations. |
Hello! (autowrap:define-bitmask-from-constants (sdl-init-flags)
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
sdl2-ffi:+sdl-init-joystick+
sdl2-ffi:+sdl-init-haptic+
sdl2-ffi:+sdl-init-gamecontroller+
sdl2-ffi:+sdl-init-noparachute+
'(:everything . #x0000FFFF)) To: (autowrap:define-bitmask-from-constants (sdl-init-flags)
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
;; sdl2-ffi:+sdl-init-joystick+
;; sdl2-ffi:+sdl-init-haptic+
;; sdl2-ffi:+sdl-init-gamecontroller+
sdl2-ffi:+sdl-init-noparachute+
'((logior sdl2-ffi:+sdl-init-events+
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
;; sdl2-ffi:+sdl-init-gamecontroller+
;; sdl2-ffi:+sdl-init-joystick+
;; sdl2-ffi:+sdl-init-haptic+
;; sdl2-ffi:+sdl-init-sensor+
) . #x0000FFFF)) I Thanks a lot! Regards, |
Oh, I wrote it a bit cryptically I see now. You can first try (autowrap:define-bitmask-from-constants (sdl-init-flags)
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
sdl2-ffi:+sdl-init-joystick+
sdl2-ffi:+sdl-init-haptic+
sdl2-ffi:+sdl-init-gamecontroller+
sdl2-ffi:+sdl-init-noparachute+
'(:everything . #.sdl2-ffi:+sdl-init-everything+)) This sets Which brings us to what I had to do to make it work when I had the issue: (autowrap:define-bitmask-from-constants (sdl-init-flags)
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
sdl2-ffi:+sdl-init-joystick+
sdl2-ffi:+sdl-init-haptic+
sdl2-ffi:+sdl-init-gamecontroller+
sdl2-ffi:+sdl-init-noparachute+
'(:everything .
#.(logior
sdl2-ffi:+sdl-init-events+
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
;; sdl2-ffi:+sdl-init-gamecontroller+
;; sdl2-ffi:+sdl-init-joystick+
;; sdl2-ffi:+sdl-init-haptic+
;; sdl2-ffi:+sdl-init-sensor+
))) ; these hanging parens are considered bad style. Just sayin'. Since I cannot reproduce the issue anymore, it's up to you to try different combinations by commenting out and adding flags inside the Can you, by the way, post the error message that you get as text here? Before you make any changes. Wishing you success and great enjoyment with CEPL. It's truly awesome. EDIT: I strongly suggest to restart SBCL before each try. |
Hey! (autowrap:define-bitmask-from-constants (sdl-init-flags)
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
sdl2-ffi:+sdl-init-joystick+
sdl2-ffi:+sdl-init-haptic+
sdl2-ffi:+sdl-init-gamecontroller+
sdl2-ffi:+sdl-init-noparachute+
'(:everything .
#.(logior
sdl2-ffi:+sdl-init-events+
sdl2-ffi:+sdl-init-timer+
sdl2-ffi:+sdl-init-audio+
sdl2-ffi:+sdl-init-video+
;; sdl2-ffi:+sdl-init-gamecontroller+
;; sdl2-ffi:+sdl-init-joystick+
;; sdl2-ffi:+sdl-init-haptic+
;; sdl2-ffi:+sdl-init-sensor+
))) ; these hanging parens are considered bad style. Just sayin'. The above code worked flawlessly when ran like this in the terminal: sbcl --no-userinit
--load ~/quicklisp/setup.lisp
--eval '(ql:quickload :cepl.examples)'
--load examples/game-of-life.lisp
--eval '(cepl:repl)'
--eval '(cepl.examples::run-loop)'
--quit That is, it worked consistently with the "game-of-life.lisp" example. With other flags: W/O "--no-userinit" (any other flags like "--no-sysinit" make no difference) "game-of-life.lisp": With other Examples: ANY FLAGS W/ "compute.lisp": ANY FLAGS W/ "triangle.lisp": Another interesting fact is that the percentage working with the "compute.lisp" example drops signifacantly when commenting out the "no-parachute" line. I tried this with the "game-of-life.lisp" and that flag with many others made no difference. Whereas I did not try with other examples. Yes, It's that random. The above "Works 20% of the time" was with changing out flags in the "logior" thing and with different sbcl flags. I roughly linked this with the fact that the error contains something about threads, which could be unorthodox. Although the consistency with the GOL example is really interesting. I don't understand which part of the code could trigger this randomness and why the flags given to SBCL would matter in the context of randomness. I hope this was atleast of some help for your debugging. If there is anyway I could give access to my system in a way where you could debug this problem (Maybe something involving Virtual Machines?), I would love to cooperate. I thank you sincerely. Regards, |
I might have not been clear enough in my explanation. A way to make sure that the change is made to the correct file is to: The form under that is to be replaced. Also, only the lines after the Can you also copy the error messages that you get and paste them in a code block (inside three backquotes) here? |
Hello, (ql:where-is-system :sdl2)
The errors were only of invalid syntax. Not of any real problems, the invalid syntax was of trying to tweak the definition of :everything. That problem is fixed since you explained what you meant with that message. Basically: I have done everything correctly and there are no errors you need to worry about except for the main problem at hand; The XInitThreads one which opened this issue in the first place. Regards, |
Alright. Just making sure we're playing the same game. ;) By the way, found Could be useful to try on an X11 system: Putting them here, so I find them later, when running Linux again. Also the original error message:
|
Alright, just so you know, according to X Synchronization Docs, If |
Hello @baggers-br! Regards, |
Okay I now own a new PC. Maybe the issue is resolved here? |
You mean AMD Ryzen CPU with builtin GPU? |
Yes
Oh.
Ah, yes, that makes more sense.
Thank you. When I will start working on the OpenGL project again, I will be sure to use it (if it works) :) |
Hi, I used to use CEPL a lot. A month after I left it, it doesn't work the same.
## Let Me Explain
Right after creating my project normally with
quickproject
,cl-project
or even CEPL's owncepl:make-project
. I load the project and runningcepl:repl
works flawlessly, first try. On a restart ofSly
,Slime
orEmacs
(all of which I have tested thoroughly on), on doing the same steps minus the project creation, then runningcepl:repl
yeilds a window which does not draw and does not respond (meaning it says "not responding"). It doesn't even give me back control of the REPL and instead presents me with a "REPL is busy" message. It also doesn't give me an error and the only option I have is toxkill
the application.## Steps to Reproduce
For this example, I am going to use the "Sly" REPL and the code is going to be from https://github.com/cbaggers/cepl.examples though this works on any code created with CEPL
git clone https://github.com/cbaggers/cepl.examples
cd cepl.examples
(ql:quickload :cepl.examples)
(in-package :cepl.examples)
(load (compile-file "examples/game-of-life.lisp"))
(cepl:repl)
(run-loop)
Everything should work uptill now, display the window properly and work as expected. Time for the restart:
Between the bottom two, the order doesn't matter, because, as soon as Step 7 is run, the REPL averses from me.
7.
(cepl:repl)
8.
(run-loop)
This is my first propper issue, so please forgive my mistakes in formatting or otherwise. Thanks.
Edit: Add the restarting steps
The text was updated successfully, but these errors were encountered: