Adding first filter to pipeline causes DB Assertion error

Adding first filter to pipeline causes DB Assertion error

Adding the first filter (the input_filter) to a tbb pipeline causes this assertion error: pipeline.cpp Line: 346
" Expression: filter_.prev_filter_in_pipeline==filter::not_in_pipeline()
filter already part of pipeline? "

This happens with not just my code, but the filter definitions from the supplied text_filter project, after copying them into my code environment.

Compiling and running the text_filter project by itself works fine. (version: TBB: VERSION 2.1
TBB: INTERFACE VERSION 3014
TBB: BUILD_DATE Sun, 7 Dec 2008 14:18:46)

The debugger shows that "prev_filter_in_pipeline" has value -1 in my environment when the same code compiled alone gets value 0, and thus no assertion error.
Can anyone help?
Thanks. Mitch

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I presume that you checked what the message hinted at (that the filter was only added once, to a single pipeline)? I would have to see the code first before I might come up with anything useful. And of course you might try this patch for tbb21_20081109oss (see the "Pipeline" thread), to see if it provides another clue.

Quoting - Raf Schietekat

I presume that you checked what the message hinted at (that the filter was only added once, to a single pipeline)? I would have to see the code first before I might come up with anything useful. And of course you might try this patch for tbb21_20081109oss (see the "Pipeline" thread), to see if it provides another clue.

Thanks Raf. I did check that.

I have just gotten past this problem.
The solution was to move all the tbb includes to the top of the order, i.e. immediately after a necessary first include stdafx.h. There had been over a dozen interceding ones.

Best.
Mitch

Leave a Comment

Please sign in to add a comment. Not a member? Join today