[Xapian-devel] Sample quickstartindex unable to create database on Windows 2008
charlie at juggler.net
Thu Jul 2 11:43:03 BST 2009
Olly Betts wrote:
> On Wed, Jul 01, 2009 at 11:11:45AM -0700, Martin Margo wrote:
>> I debugged the program and in database.cc in Xapian code line 205 function
>> WritableDatabase::WritableDatabase(const std::string &path, int action) : Database ()
>> 'path' variable is preceeded with weird characters, such as so:
>> const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
>> While it should have read 'C:\tmp\junk14'.
> But that is just passed straight in from argv by
> What is argv as passed to quickstartindex?
> And what are these 4 bytes exactly? They're showing up as 0xcc here,
> but it's not clear if they've been mangled from their original values.
> Or are you looking at the raw data inside the string class? That would
> probably have the length followed by the string data.
I've confirmed this problem on Visual C++ 2005 Express. Debugging inside
the WritableDatabase constructor:
WritableDatabase::WritableDatabase(const std::string &path, int action)
The debugger shows 'path' is a '<Bad Ptr>'. Somehow VC++ doesn't like
passing const references to std::strings in this way.
BTW copying argv into a temporary buffer to make sure it's definitely
zero terminated etc., then making a new std::string round it, then
passing a reference to that doesn't help.
I'm wondering (though not with any real evidence) if
has any relevance.
> Xapian-devel mailing list
> Xapian-devel at lists.xapian.org
More information about the Xapian-devel