Support Forum

ThreadControlQueue Path pop blocked

I occasionally get a block in the ThreadControlQueue when I first start the game in the Editor.

Do you have any advice on how to trouble shoot this situation?

Hi

That’s the pathfinding thread waiting for new paths to process. It is expected that one or more threads are waiting there. It shouldn’t block your main thread.

Ahh, ok thanks. That makes sense. I just hit pause in Visual Studio and had assumed that was the reason the game was locked up. Appologies.

Hello!

I have this exact same issue!
My editor freezes and the only way to continue is to Ctrl+Alt+Delete force close Unity completely.
When trying out debugging step through, it lands on the exact same line as the final cause of the hang.

Line 191: block.WaitOne();

Please advise how to get around this issue, or determine what part is causing this please?

@Cormac as I mentioned earlier:

Hi Aron,

Thanks for the fast reply to this one!
I did indeed see your earlier reply, but as this is all Visual Studio is showing when I debug Unity freezing, how can I tell its something different and not actually the line it shows please?

Is it possible to find out what statement came before this wait line of code?

Is it also possible this wait is the cause of the Unity Editor freezing please as it might be hung on a wait?

Visual Studio will show some stopped thread. It can’t know which stopped thread is actually relevant. In this case it has happened to show the pathfinding thread.
You should be able to switch to a different thread in visual studio. Alternatively, you can set A* Inspector → Settings → Pathfinding → Threads to None to make the pathfinding thread not even be started.

Thanks I’ll try that now and see what happens!
Currently all I can see in Visual Studio is below. (I’m only new to VS though! Never used the debugger before today!)

No joy, sadly Aron!

I changed the settings as you advised:
image

Then on debugging I get this error:

I’ve now added the Parallel Stacks window in Visual Studio which shows the below:

Clicking them only shows AI Destination Setter.

Very confused by this!

Sorry if this is a silly question but I don’t understand how to prove its not your software causing an issue? None of my coded classes are showing here. This is all new to me, so its probably my fault somehow. I just can’t figure it out!

Received support from another source. This ticket may be closed now.
Thank you for your time.