Hello, for some reason, my xapian often have follow errors, I know this means xapian run out of memory... --->> terminate called after throwing an instance of 'std::bad_alloc' what(): St9bad_alloc Abort trap: 6 (core dumped) <<--- So, I try to re-compile the xapian with debug mode (add --enable-log=yes --enable-assertions=yes to configure options), but got the folowing error messages: How can I fixed it? <<--- api/omdatabase.cc: In member function `Xapian::TermIterator Xapian::Database::metadata_keys_begin(const std::string&) const': api/omdatabase.cc:563: error: conversion from `Xapian::TermIterator' to non-scalar type `std::basic_string<char, std::char_traits<char>, std::allocator<char> >' requested api/omdatabase.cc:563: error: conversion from `Xapian::Database::metadata_keys_begin(const std::string&) const::omdebugapicallreturn_t' to non-scalar type `Xapian::TermIterator' requested *** Error code 1 ... backends/flint/flint_table.cc: In constructor `FlintTable::FlintTable(std::string, bool, int, bool)': backends/flint/flint_table.cc:1566: error: `tablename_' undeclared (first use this function) backends/flint/flint_table.cc:1566: error: (Each undeclared identifier is reported only once for each function it appears in.) --->>
Olly Betts
2009-May-14 02:16 UTC
[Xapian-discuss] xapian-1.0.12 compiled error with debug mode
On Wed, May 13, 2009 at 01:12:13PM +0800, ?????? wrote:> Hello, for some reason, my xapian often have follow errors, I know this means > xapian run out of memory... > > --->> > terminate called after throwing an instance of 'std::bad_alloc' > what(): St9bad_alloc > Abort trap: 6 (core dumped) > <<---The most useful way to find out what's happening is probably just to poke the core dump with gdb ("gdb core" and "bt" to given a backtrace should do it. That may just tell you it was in terminate() called by the runtime code though. You might get a more useful backtrace by running it under gdb: put "gdb --args" in front of the command to run your program, then "run" and "bt" to produce a backtrace.> So, I try to re-compile the xapian with debug mode (add --enable-log=yes > --enable-assertions=yes to configure options), but got the folowing error > messages:Oops, the first is already fixed on trunk, but we failed to backport the fix. Thanks for letting us know. It will be fixed for 1.0.13 like so: http://xapian.org/C?12707?branches/1.0/xapian-core/api/omdatabase.cc> backends/flint/flint_table.cc: In constructor `FlintTable::FlintTable(std::string, > bool, int, bool)': > backends/flint/flint_table.cc:1566: error: `tablename_' undeclared (first use this > function)This one was just badly backported (there's a new parameter here on trunk) - fix is: http://xapian.org/C?12708?branches/1.0/xapian-core/backends/flint/flint_table.cc Cheers, Olly