Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
2466 Discussions

Adding first filter to pipeline causes DB Assertion error

turks
Beginner
249 Views
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
0 Kudos
2 Replies
RafSchietekat
Valued Contributor III
249 Views

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.

0 Kudos
turks
Beginner
249 Views
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
0 Kudos
Reply