On Wed, Jan 26, 2005 at 04:16:25PM +0100, Leon Mergen wrote:
I've posted the stacktrace when the problem occurs and the source of the
code 'that matters' below. It also occurs in another function, I've
posted the other function too. I hope anyone has any experience with this,
or is able to help.
As an addition (sorry for the double-post), I also receive assertion
faults for the regex library:
---
normserv: /usr/local/include/boost-1_31/boost/regex/v4/match_results.hpp:252: void boost::match_results::set_first(BidiIterator, typename Allocator::size_type) [with BidiIterator = __gnu_cxx::__normal_iterator , Allocator = std::allocator > > >]: Assertion `pos+2 < m_subs.size()' failed.
---
This generated a SIGABRT, and this is the stacktrace when this happened:
---
#0 0x40244b71 in kill () from /lib/i686/libc.so.6
#1 0x401d2cf1 in pthread_kill () from /lib/i686/libpthread.so.0
#2 0x401d300b in raise () from /lib/i686/libpthread.so.0
#3 0x40244904 in raise () from /lib/i686/libc.so.6
#4 0x40245e8c in abort () from /lib/i686/libc.so.6
#5 0x4023de84 in __assert_fail () from /lib/i686/libc.so.6
#6 0x08069fe8 in boost::match_results<__gnu_cxx::__normal_iterator, std::allocator > > >::set_first(__gnu_cxx::__normal_iterator, unsigned) (this=0x413d28dc, i= {> = {<No data fields>}, _M_current = 0x2 }, pos=7) at match_results.hpp:252
#7 0x080677b5 in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator, std::allocator > >, boost::regex_traits<char>, std::allocator<char> >::unwind_paren(bool) (this=0x413d285c, have_match=false) at perl_matcher_non_recursive.hpp:836
#8 0x08065c8e in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator, std::allocator > >, boost::regex_traits<char>, std::allocator<char> >::unwind(bool) (this=0x413d285c, have_match=false) at perl_matcher_non_recursive.hpp:814
#9 0x0806a894 in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator, std::allocator > >, boost::regex_traits<char>, std::allocator<char> >::match_all_states() (this=0x413d285c) at perl_matcher_non_recursive.hpp:158
#10 0x08066e4a in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator, std::allocator > >, boost::regex_traits<char>, std::allocator<char> >::match_prefix() (this=0x413d285c) at perl_matcher_common.hpp:260
#11 0x08066f9b in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator, std::allocator > >, boost::regex_traits<char>, std::allocator<char> >::find_restart_any() (this=0x413d285c) at perl_matcher_common.hpp:679
#12 0x0806588a in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator, std::allocator > >, boost::regex_traits<char>, std::allocator<char> >::find_imp() (this=0x413d285c) at perl_matcher_common.hpp:237
#13 0x08063f55 in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator, std::allocator > >, boost::regex_traits<char>, std::allocator<char> >::find() (this=0x413d285c) at perl_matcher_common.hpp:167
#14 0x0806671b in regex_grep >, __gnu_cxx::__normal_iterator >, char, std::allocator<char>, boost::regex_traits<char> >, __gnu_cxx::__normal_iterator >, char, boost::regex_traits<char>, std::allocator<char> > (foo= {out = 0x413d29a0, last = 0x413d2988, fmt = 0x414716ec "\\1\\3\n<s> \\2 </s>", flags = format_sed, pt = 0x413d2a20}, first= {> = {<No data fields>}, _M_current = 0x4145afac "<s> om zijn brood te verdienen</s>\n<s>Wetenschappelijke ambitie is hem </s>"}, last={> = {<No data fields>}, _M_current = 0x4145aff8 ""}, e=@0x413d2a1c, flags=format_sed) at regex_grep.hpp:49
#15 0x08064b33 in boost::re_detail::string_out_iteratorstd::string boost::regex_replacestd::string, __gnu_cxx::__normal_iterator, boost::regex_traits<char>, std::allocator<char>, char>(boost::re_detail::string_out_iteratorstd::string, __gnu_cxx::__normal_iterator, boost::re_detail::string_out_iteratorstd::string, boost::reg_expression const&, boost::re_detail::string_out_iteratorstd::string const*, boost::regex_constants::_match_flags) (out={out = 0x413d2a9c}, first= {> = {<No data fields>},_M_current = 0x4145afac "<s> om zijn brood te verdienen</s>\n<s> Wetenschappelijke ambitie is hem </s>"}, last={> = {<No data fields>}, _M_current = 0x4145aff8 ""}, e=@0x413d2a1c, fmt=0x414716ec "\\1 \\3\n<s> \\2</s>", flags=format_sed) at regex_replace.hpp:41
#16 0x08063b6c in std::basic_string boost::regex_replace(std::basic_string const&, boost::reg_expression const&, std::basic_string const&, boost::regex_constants::_match_flags) (s=@0x413d2b3c, e=@0x413d2a1c, fmt=@0x413d2aac, flags=format_sed) at regex_replace.hpp:76
#17 0x08063452 in RegexEngine::parseReplaceRegex(std::string const*, std::string const*, std::string const*) (this=0x80c96c0, regex=Cannot look up value of a typedef ) at RegexEngine.cc:11
#18 0x0808efef in ModuleSplitSentences::findQuotes(std::string) (this=0x80ce818, data= {static npos = 4294967295, _M_dataplus = { = {<No data fields>}, _M_p = 0x4145afac "<s> om zijn brood te verdienen</s>\n<s> Wetenschappelijke ambitie is hem </s>"}, static _S_empty_rep_storage = {0, 0, 529, 0}}) at ModuleSplitSentences.cc:141
#19 0x0808e73b in ModuleSplitSentences::applyModule(InputData*) (this=0x80ce818, inputData=0x80d1420) at ModuleSplitSentences.cc:37
#20 0x08062200 in ModuleParser::parse(InputData*) (this=0x80ce388, inputData=0x80d1420) at ModuleParser.cc:105
#21 0x0805e1db in Normaliser::normalise() (this=0x80d13e0) at Normaliser.cc:107
#22 0x080831f4 in Client::operator()() (this=0x80c88a8) at Client.cc:44
#23 0x080542bf in boost::detail::function::void_function_obj_invoker0::invoke(boost::detail::function::any_pointer) (function_obj_ptr= {obj_ptr = 0x80c88a8, const_obj_ptr = 0x80c88a8, func_ptr = 0x80c88a8, data = "�"}) at function_template.hpp:128
#24 0x400a69f4 in boost::thread_group::join_all() () from /usr/local/lib/libboost_thread-gcc-mt-1_31.so.1.31.0
#25 0x401cff60 in pthread_start_thread () from /lib/i686/libpthread.so.0
#26 0x401d00fe in pthread_start_thread_event () from /lib/i686/libpthread.so.0
#27 0x402f7327 in clone () from /lib/i686/libc.so.6
---
Since this concerned an assertion failing, I considered this might be of
use to see what's going on...
Thanks in advance!
Regards,
Leon Mergen