From 34794c5c27b910d768b1a8257fdf37aa56b74fc7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 4 Sep 2015 15:04:58 +0000 Subject: [PATCH] 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/trunk@15125 16af8721-9629-0410-8352-f15c8da7e697 --- include/osgDB/ImagePager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/osgDB/ImagePager b/include/osgDB/ImagePager index 662f44847..a9776b396 100644 --- a/include/osgDB/ImagePager +++ b/include/osgDB/ImagePager @@ -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();