From Laurens Voerman, "I found that using an ImageSequence with mode PAGE_AND_DISCARD_USED_IMAGES triggers the (3) imageThreads to run and never stop, even when no more work is to be done. This is due to a bug in the stop condition currently setting the thread to stop and wait for a signal only when no work needs to be done AND the databasepager is paused.

It should stop and wait for a signal on either of those two. Due to a few logical inversions it boils down to replacing || with &&

OLD _block->set((!_requestList.empty() || !_pager->_databasePagerThreadPaused));
NEW _block->set((!_requestList.empty() && !_pager->_databasePagerThreadPaused));//release the threads to run IF (work_to_be_done && not_paused)

This bug is present since svn rev 8663 (just before 2.6.0 release)


attached is a zip with the files:

OpenSceneGraph\include\osgDB\ImagePager



This file is valid for svn branch and stable 3.2 and 3.4
branches 2.6 - 3.0 have the same bug, but other differences in the file."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15126 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2015-09-04 15:05:06 +00:00
parent 5cbd785f78
commit 0567ce316d

View File

@ -149,7 +149,7 @@ class OSGDB_EXPORT ImagePager : public osg::NodeVisitor::ImageRequestHandler
void updateBlock()
{
_block->set((!_requestList.empty() || !_pager->_databasePagerThreadPaused));
_block->set((!_requestList.empty() && !_pager->_databasePagerThreadPaused));
}
void clear();