Task is_alive() == true but task has stopped

Hello,

I found a bug in my code and it seems my task appears to be running, according to is_alive(), but I can see from the logging that it stops since I have logging inside the task which stops occuring at a certain point. I don’t stop it explicitly, I just add it and then leave it returning DS_cont. I can’t see any assertions, yet the code isn’t executed.

Having looked at it again it seems my other task is also stopping. I wondered if the main thread was being blocked or something. Has anyone seen anything like this?

Cheers,
Zobbo

Do you have a simple sample program that will demonstrate this issue?

The code is pretty complex but I’ll try and do that today.

Well my theory was that starting a task in a state pattern was breaking it when switching the state object to another state, but that doesn’t seem to be the case and doesn’t really make sense since the call is static, but I couldn’t see what else it could be. I crunked it down to that code but it seems to be ok. So back to debugging…

It looks like it’s related to the camera which I use to pitch the view up and down (I use physics for other movement and just fix the camera to my character controller). If I disable that, everything works ok. So I’ll try and replicate that with some other code.

I’ll probably change the way I’ve implemented the camera across the server and just implement it locally on the client which should avoid that issue, I had doubts about the way I’d done it anyway.