It doesn't happen every time, but if an NPC is flagged for ranged attacks and they kill their target, the AIProcess function continues on under the assumption that the target is still available.
I just adjusted it to set a flag and do the actual attack at the end of the function. I haven't been able to reproduce the crash since.
http://dungeoncrawl.us.to/eq/rangedatk.diff.txt