Well, my first thought would be to start eliminating the functions one by one until the crash disappears.

I mean, if you have different enemies, door functions and the player function, start adding "return;" in them right when they start, so you can see what function causes a problem, if it is a function...
If it still runs, remove the return and add it in another function...

Also, its a good idea to always check if a pointer points to something, even if you're sure it does, before using it... I recently had huge problems with BMAPs because of this laugh even with checks that a pointer points to something...


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201