Avoiding 'zombie-windows' on OSX
epeld opened this issue · 2 comments
Whenever I run into a condition in any of the GLUT-window event handlers the current window turns into a zombie on OSX, SBCL.
Example:
displaying a window with a working glut:display
-implementation
(defmethod glut:display ((w my-window))
'empty)
and then changing the implementation AFTER the window has appeared to:
(defmethod glut:display ((w my-window))
(error "BAM"))
This will put me into the debugger in emacs with 3 possible restarts (e.g retry/abort/abort), however no matter what I choose the current window is now a zombie (i.e it is still visible but won't respond to ANY events, not event "close").
Also, fixing the condition-cause and hitting "retry" re-runs my top-level command, which was display-window (make-instance 'my-window))
, which causes a new window to appear, but now GLUT eats 100% of my CPU for some reason.
I am guessing maybe the GLUT main loop becomes confused when event handlers don't return normally? Is there a way to salvage the window?
I've had this happen with both glut:display
and glut:tick
.
Hope the description makes sense :) Thanks!
I'm having the same issue on Ubuntu 18.04. But somehow it wasn't happening on 16.04. I wonder if it has something to do with the window manager. Have you found a way to kill the zombie windows without killing the mother Lisp process?
No didn't manage to do that.
But if I remember correctly, I got better results by changing Slime to run in 'single-threaded mode' (i.e request-reply). After doing that I think I could actually keep the window responsive even after running into conditions. That is, I would get error in my debugger, fix the problem and then hit 'continue'/'retry' (on the originating function) and the even handler could keep going.