Boost logo

Boost Users :

From: James Mastro (jmastro_at_[hidden])
Date: 2003-11-12 20:59:16


This one has been driving me nuts all day. In a function I have the
following:

std::list< boost::shared_ptr<MyObject> > * objectList;

When debugging my code, the debugger (gdb) dies upon entering the
function with this in it. It says "The Debugger has exited due to signal
11 (SIGSEGV).The Debugger has exited due to signal 11 (SIGSEGV)." My dev
tools felt the need to say it twice for some reason. I pulled this out
and put it in a new project all by itself with the same result.

If I make it not be a pointer, like this:

std::list< boost::shared_ptr<MyObject> > objectList;

then there's no problem.

Oddly, both versions of the code work fine when run normally (not being
debugged.)

I don't see what's wrong with the first version. Is it OK to put boost
shared ptrs in a std::list? Is there something else I'm missing?

Or is my dev environment just having problems?

-jim


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net