From ff846833e867dd56d99f9c0922ba82e1265c7c8b Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Tue, 14 Oct 2008 22:05:43 +0000 Subject: [PATCH] more debug output when encountering bad jobqueue items git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1751 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/core/mixer.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/core/mixer.cpp b/src/core/mixer.cpp index 5a0e7d20d..33d4fabb2 100644 --- a/src/core/mixer.cpp +++ b/src/core/mixer.cpp @@ -178,17 +178,17 @@ private: while( m_quit == false ) { m_queueReadySem->acquire(); + jobQueueItems::iterator end_it = s_jobQueue.items.end(); for( jobQueueItems::iterator it = s_jobQueue.items.begin(); - it != s_jobQueue.items.end(); ++it ) + it != end_it; ++it ) { #if QT_VERSION >= 0x040400 - if( it->done.fetchAndStoreOrdered( 1 ) == 0 && - it->job != NULL ) + if( it->done.fetchAndStoreOrdered( 1 ) == 0 ) { #else s_jobQueue.lock.lock(); - if( !it->done && it->job != NULL ) + if( !it->done ) { it->done = true; s_jobQueue.lock.unlock(); @@ -213,7 +213,11 @@ private: case EffectChannel: engine::getFxMixer()->processChannel( (fx_ch_t) it->effectChannelJob ); + break; default: +fprintf( stderr, "invalid job item type %d at %d in jobqueue(%d:%d)\n", + (int) it->type, (int) it, (int) s_jobQueue.items.begin(), + (int) end_it ); break; } }