deadlock!

Hey,

When I start my Program and it gets to a function call, it always ends with this:

:thread(error): Deadlock!  All threads blocked.

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I saw this: discourse.panda3d.org/viewtopic … 5543f0f223
But I dont know what to do about that.
My OS is Win7, 32bit

I doubt this is related to the linked thread. A deadlock is like a segment fault or an uncaught exception: it doesn’t refer just to a one specific problem, but to a broad category of problems that might occur anywhere throughout the code. So, just because someone else ran into a Deadlock in a different context, doesn’t mean it’s likely to be the same Deadlock that you’re running into.

There are two common ways to achieve deadlock: (1) you are running a multi-threaded application, and your threads are all blocked for some reason, usually because they’re blocking on each other’s mutexes, or (2) in any application, single-threaded or otherwise, you attempt to lock the same mutex twice in one thread (this is called a self-deadlock).

I’ll assume you’re not intentionally using threads, or you would probably be more familiar with the concept of a deadlock, which leaves (2) as the most likely problem in this case.

I’ll further assume that you’re not intentionally using mutexes, which means this is probably something that Panda is doing wrong, in some particular circumstance.

So, in order to diagnose the problem, I need to know precisely what Panda function call you made that triggered the deadlock condition. Can you reduce the program to the simplest possible illustration of the crash?

David

Ok, I think I found a bug in directwindow. discourse.panda3d.org/viewtopic … 057da45ebe

Im calling a function that looks like that:

y = DirectWindow()

when i get something from my server. I get that from my server, when I press P . then it will send me my new inventar and execute that function. When I replace DirectWindow with DirectButton or something else, the error doesnt appear anymore.
I noticed that the error only apperears when I press p very fast and often.

Maybe ill add code this evening