Comment 0 for bug 1019599

Revision history for this message
Jairo Henrique (heek) wrote :

Ubuntu 11.04 32, Panda3d nigthlybuild or cvs build or 1.8

There's some information and test code here:
http://www.panda3d.org/forums/viewtopic.php?p=86260#86260

The same problem happens here:
http://www.panda3d.org/forums/viewtopic.php?t=12710

--
Two threads (at least) is running:
1. BamCache is loading a heavy model, and his ReMutexHolder "_lock" is being held for the multithreaded approach.
2. The main thread is trying to render the frame. When it comes in GraphicsEngine::render_frame(), the thread try to execute the line 641:

Code:
BamCache *cache = BamCache::get_global_ptr();
cache->consider_flush_index();

BamCache::consider_flush_index() uses the ReMutexHolder "_lock" as well, making it wait 'till the model loading is complete to only then release the lock.