Segmentation fault in STL iterator

S

silverburgh.meryl

I have the following piece of code, but it causes a segmentation fault.
I appreciate if someone can tell me why it crashes in bdl.end():

Line 55 of RectUtils.cpp:

void buildContainerRegion(vector<Rect*>& bdl) {
// thjis is line 55:
do_buildContainerRegion rtnValue = for_each (bdl.begin(),
bdl.end(), do_buildContainerRegion());

}


#0 0x014153e4 in __normal_iterator (this=0x4, __i=@0x4) at
stl_iterator.h:603
#1 0x0144117a in std::vector said:
::end (this=0x0) at stl_vector.h:352
#2 0x01447583 in buildContainerRegion (bdl=@0x0, r=@0xbff0e434) at
RectUtils.cpp:55

Thank you.
 
M

Markus Moll

Hi

I have the following piece of code, but it causes a segmentation fault. [...]
#2 0x01447583 in buildContainerRegion (bdl=@0x0, r=@0xbff0e434) at
RectUtils.cpp:55

Uh oh... bdl=@0x0?
 
T

TB

(e-mail address removed) sade:
I have the following piece of code, but it causes a segmentation fault.
I appreciate if someone can tell me why it crashes in bdl.end():

Line 55 of RectUtils.cpp:

void buildContainerRegion(vector<Rect*>& bdl) {
// thjis is line 55:
do_buildContainerRegion rtnValue = for_each (bdl.begin(),
bdl.end(), do_buildContainerRegion());

}


#0 0x014153e4 in __normal_iterator (this=0x4, __i=@0x4) at
stl_iterator.h:603

#2 0x01447583 in buildContainerRegion (bdl=@0x0, r=@0xbff0e434) at
RectUtils.cpp:55

Do you see the null pointers?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top