From e7b828c884b82f58d2abb5babd55b6d322e9bac2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 2 May 2012 23:43:04 +0000 Subject: Add some assertions to hopefully track down a rare bug. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4315 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/EventSource.cpp | 1 + src/server/PostProcessor.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/EventSource.cpp b/src/server/EventSource.cpp index abbd33dd..a8eb3ec4 100644 --- a/src/server/EventSource.cpp +++ b/src/server/EventSource.cpp @@ -98,6 +98,7 @@ EventSource::process(PostProcessor& dest, ProcessContext& context, bool limit) if (num_events_processed > 0) { Event* next = (Event*)last->next(); last->next(NULL); + assert(!last->next()); dest.append(_head.get(), last); _head = next; if (!next) diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp index 316c6f0f..3a8ee612 100644 --- a/src/server/PostProcessor.cpp +++ b/src/server/PostProcessor.cpp @@ -20,10 +20,11 @@ #include "Driver.hpp" #include "Engine.hpp" +#include "Event.hpp" #include "Notification.hpp" #include "PostProcessor.hpp" #include "ProcessContext.hpp" -#include "Event.hpp" +#include "ThreadManager.hpp" using namespace std; using namespace Raul; @@ -44,6 +45,7 @@ PostProcessor::~PostProcessor() void PostProcessor::append(Event* first, Event* last) { + ThreadManager::assert_thread(THREAD_PROCESS); assert(first); assert(last); assert(!last->next()); -- cgit v1.2.1