Community
cancel
Showing results for 
Search instead for 
Did you mean: 
morle
Beginner
134 Views

TBB captured exception

Jump to solution
Hi,

yesterday I got this exception while working with a concurrent vector and some std::vectors inside a task:

terminate called after throwing an instance of 'tbb::captured_exception'
what(): vector::_M_range_check


My question is: was the exception raised because I tried to access a position out of bounds in the concurrent vector, or could it be throw by the std::vector too but it was captured by the task scheduler?

Thanks.
0 Kudos
1 Solution
SergeyKostrov
Valued Contributor II
134 Views
Quoting morle
...
My question is: was the exception raised because I tried to access a position out of bounds in the concurrent vector,

[SergeyK] That is possible. Would you be able to provide a Test-Case?

or could it be throw by the std::vector too but it was captured by the task scheduler?

...
what(): vector::_M_range_check
...

[SergeyK]Ithink Yes. STL vector exception messages have a'vector::' part. Check
these STLheaders:

stl_vector.h
stl_bvector.h
stl_deque.h

for more technical details.

Best regards,
Sergey

View solution in original post

3 Replies
SergeyKostrov
Valued Contributor II
135 Views
Quoting morle
...
My question is: was the exception raised because I tried to access a position out of bounds in the concurrent vector,

[SergeyK] That is possible. Would you be able to provide a Test-Case?

or could it be throw by the std::vector too but it was captured by the task scheduler?

...
what(): vector::_M_range_check
...

[SergeyK]Ithink Yes. STL vector exception messages have a'vector::' part. Check
these STLheaders:

stl_vector.h
stl_bvector.h
stl_deque.h

for more technical details.

Best regards,
Sergey

View solution in original post

tehpikachu
Beginner
134 Views
my sig
Thanks a lot
morle
Beginner
134 Views
Thanks!!

It was a STL vector!
Reply