After succeeding with the Scheduler I wanted to test it, and I found another problem; I've got a function called 'asyncExec' that creates a new MDThread made from either a MiniD function or a script file and pushes it onto the Scheduler-queue. It looks like this (I took the unimportant parts out):

Now I wanted to test asyncExec by calling it 50 times by a MiniD-script that was itself called by asyncExec.
It worked for exactly 16 scripts, but the 17th call of asyncExec failed at minid/interpreter.d in the popAR-function:

My best guess at this point is that the threads that you're creating are being GCed by the MiniD GC without your knowledge. I see you create the new thread in asyncExec, but then pop it off the stack.. without any references to that thread on the stack or in the globals, it'll be collected. Then, when you try to wake up the thread, it's pointing to god-knows-what and weird things happen.

Sorry for the late reply; for a few reasons I started to port my project to C++. The reasons are basically the same as in the Open Morrowind-project, so it's got nothing to do with MiniD. Thanks for your support anyway!