I use this function to print all running tasks:
void print_all_running_tasks() {
#define fctName _str("void print_all_running_tasks()")
ediag_entering(fctName);
char* funcname;
ENTITY* ent;
int i = 0;
for (i=0; i<num_actions; i++) {
engine_gettaskinfo(i,&funcname,&ent);
if (funcname != NULL) {
ediag(fctName, LEVEL_INFO, _str(funcname));
} else {
ediag(fctName, LEVEL_INFO, _str("funcname was NULL"));
}
}
ediag_exiting(fctName);
}
I receive this result right before the level_load:
[21:39:52:083] INFO [void print_all_running_tasks()]: starting function
[21:39:52:083] INFO [void print_all_running_tasks()]: calculateFreeGPUmemory
[21:39:52:083] INFO [void print_all_running_tasks()]: mouse_key_observer
[21:39:52:099] INFO [void print_all_running_tasks()]: garbageObserver
[21:39:52:099] INFO [void print_all_running_tasks()]: fmod_eventUpdater
[21:39:52:099] INFO [void print_all_running_tasks()]: fmod_trackMemoryUsage
[21:39:52:099] INFO [void print_all_running_tasks()]: inv_arrows
[21:39:52:099] INFO [void print_all_running_tasks()]: internalClock
[21:39:52:099] INFO [void print_all_running_tasks()]: scheduleHandler
[21:39:52:099] INFO [void print_all_running_tasks()]: player_movement
[21:39:52:099] INFO [void print_all_running_tasks()]: player_movement
[21:39:52:099] INFO [void print_all_running_tasks()]: load_new_room
[21:39:52:099] INFO [void print_all_running_tasks()]: exiting function
And this is what I get right after the level_load (before the wait command):
LevelInit at 46.934
14 entities 0 cameras 0 lights 0 sounds 2 paths
1 lmaps 1 textures 7 meshes 7 submeshes 104 faces...ok
LevelReady at 47.692
[21:39:54:213] INFO [void load_new_room (STRING* lName, STRING* entPosName)]: level was loaded.
[21:39:54:213] INFO [void print_all_running_tasks()]: starting function
[21:39:54:228] INFO [void print_all_running_tasks()]: calculateFreeGPUmemory
[21:39:54:228] INFO [void print_all_running_tasks()]: mouse_key_observer
[21:39:54:228] INFO [void print_all_running_tasks()]: garbageObserver
[21:39:54:228] INFO [void print_all_running_tasks()]: fmod_eventUpdater
[21:39:54:244] INFO [void print_all_running_tasks()]: fmod_trackMemoryUsage
[21:39:54:244] INFO [void print_all_running_tasks()]: inv_arrows
[21:39:54:244] INFO [void print_all_running_tasks()]: internalClock
[21:39:54:244] INFO [void print_all_running_tasks()]: scheduleHandler
[21:39:54:244] INFO [void print_all_running_tasks()]: funcname was NULL
[21:39:54:244] INFO [void print_all_running_tasks()]: funcname was NULL
[21:39:54:244] INFO [void print_all_running_tasks()]: exiting function
The two entries with "funcname was NULL" are the "player_movement" functions from above that are still in the list until the next wait(1). At first I thought that those cause the crash, but I also removed them completely already ... no change at all.
I also checked all those function in the list, but couldn't find anything suspicious.
As far as I know functions are only listed by engine_gettaskinfo after their first wait command, is this right? In this case the list might not be complete.