Thank you for the advice. Luckily, I just needed on change in defining the *typing-callback* to make sure my display callback was called properly in the main thread:
Thank you.
On Jan 3, 2017, at 6:52 AM, Rainer Joswig <joswig@lisp.de> wrote:
Hi,
it crashes already without using the sounds after some typing. Mac, Lispworks 64bit, macOS Sierra.
I haven't looked closely, but I fear how you use threads and timers may not work.
Remember that the Mac wants things (drawing, ...) to happen in the main thread.
Just guessing.
The function FILTER is called REMOVE in Common Lisp. It does the same.
Also you have an unhealthy mix of global variables and closed over lexical variables. These variables are relevant for the pane.
I would recommend:
a) subclass the pane class and add the appropriate slots. Access the data via the pane objects slots.
or
b) capi-objects have property lists. An output-pane has a superclass capi-object. see capi:capi-object-property to get/set those.
Generally I would recommend a).
Regards,
Rainer
Hello,
I’m working on a little typing game and when I added sound to the mix, LispWorks will consistently hang with this program. More specifically, it seems that it starts crashing reliably once I added a call to stop-sound before my next call to play-sound in typing-handle-character.
Source attached in typing.lisp which should run without any other dependencies. Just run and start typing the words as they come across the screen, after less than 10 words usually it should either popup and error about a segmentation violation or hang the system and just stop working.
Hopefully this test program can help with improving the stability of LispWorks.
—
Burton Samograd
<typing.lisp><typewriter.wav>