Boost logo

Boost Users :

Subject: [Boost-users] Assertion 'px != 0' failed when using boost::regex
From: Daniel Hansen (dhansen_at_[hidden])
Date: 2008-11-06 03:01:59

Hey everyone, I'm in desperate need of some help here. I'm working on a
webcrawler for a computer science class and I'm using boost::regex to parse
some of the html elements. After calling a few boost::regex functions, I
get this error. It doesn't seem to be tied to any specific funcion, but it
seeems to come up after a certain number of calls to the functions. Here is
the exact error:

test: /usr/include/boost/shared_ptr.hpp:315: T*
boost::shared_ptr<T>::operator->() const [with T =
char*, std::basic_string<char, std::char_traits<char>, std::allocator<char>
> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >]:
Assertion `px != 0' failed.

and the backtrace:
#0 0x00110416 in __kernel_vsyscall ()
#1 0x005424c0 in raise () from /lib/
#2 0x00543e88 in abort () from /lib/
#3 0x0053b3fe in __assert_fail () from /lib/
#4 0x0806228f in
const*, std::string>, char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > > >::operator-> (this=0xbfffef04)
    at /usr/include/boost/shared_ptr.hpp:315
#5 0x080622a7 in
boost::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*,
std::string>, char, boost::regex_traits<char, boost::cpp_regex_traits<char>
> >::operator* (this=0xbfffef04)
    at /usr/include/boost/regex/v4/regex_token_iterator.hpp:243
#6 0x080582cd in HTMLParser::parse

I have attached my code, so that you can see what functions I'm using and in
what context, etc. I really appreciate all your help.

Daniel Hansen

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at