I found the Lab on cdcallback and followed it, I did the qsort version and
it all works as described but applying it to my SDL application I got this
as soon as the timer kicks in, I tried different timer values to ensure it
was related:

timerid:1
|stack error: sdl_renderpresent
|       sdl_renderpresent appr

My callback is as simple as they come as I wanted to remove any doubts
about cross-thread corruption, I assumed therefore that this implementation
would not cause any great upset:

cdcallback =: 3 : 0
0
)

So I think that cdcallback only works when in the same thread (did I miss
that in the lab?) i.e. the main thread as obviously id SDL is creating a
fork() call somewhere then there is likely to be some issue with stacks,
environments etc etc etc

I will dig a little more but the stack error means the stack was exhausted,
typically due to recursion. I checked the J source code for EVSTACK ("stack
error") and it seemed reasonable so I am guessing that the SDL context
switch derailed the J engine in its tracks.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to