Issues with Panda3D 1.6.0

When running the media player sample, I’m getting a deadlock:

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

Traceback: pastebin.ubuntu.com/148429/

(Currently, on Linux, loader.loadTexture is not guaranteed to return a MovieTexture, so you might want to replace loader.loadTexture with MovieTexture() to get a repro).

This is probably a case of a mutex getting recursively locked: attempting to lock a mutex that is already held by the current thread. This causes self-deadlock.

In this case, judging by the traceback, I’m guessing it’s the call to get_z_size() in MovIeTexture::do_read_one(). Since do_read_one() is called with the lock held, it mustn’t call any other methods that grab the lock, and get_z_size() certainly does. Deadlock! The solution is in this case is just to reference the member _z_size directly. (In other cases, it would be to call the corresponding do_blah() method, for instance do_get_z_size(), but we didn’t bother to implement do_get_z_size() for such a simple accessor.)

Now, I’m not sure there aren’t any other cases of recursive locking in there. You’ll have to fix this one, and see if it still crashes.

Incidentally, I’m surprised that there don’t appear to be source line numbers and such in your traceback. Are the debug symbols missing from your build?

Thanks for the explanation - I’ll give it a try.

I encountered it when testing my makepanda build - my ppremake build never had threading. I kind of assumed it was the default setting for ppremake now. Never bothered to change it. :slight_smile:

That was it - besides the has_filename call as well. Thanks alot!