Rusty Conover
2007-Nov-14 00:38 UTC
[Xapian-devel] Problem indexing text with spelling enabled in Perl
Hi All, I'm using the TermGenerator::index_text() on version 1.0.4 with the FLAG_SPELLING turned on, because the new spelling suggestion stuff seems awesome, but I'm getting a segv. (gdb) bt #0 0xb7ae153c in Xapian::WritableDatabase::add_spelling (this=0xa553988, word=@0xbff97724, freqinc=1) at ./include/xapian/ base.h:154 #1 0xb7becf47 in Xapian::TermGenerator::Internal::index_text (this=0xa553970, itor {p = 0xab2d69f " North Face Windwall 1 Jacket boys", end = 0xab2d6c1 "", seqlen = 1}, weight=3, prefix=@0xbff977ac, with_positions=true) at queryparser/termgenerator_internal.cc:207 #2 0xb7bebf0c in Xapian::TermGenerator::index_text (this=0x9b12d68, itor=@0xbff9779c, weight=3, prefix=@0xbff977ac) at queryparser/ termgenerator.cc:90 #3 0xb7c6b6d6 in XS_Search__Xapian__TermGenerator_index_text () from /usr/local/lib/perl5/site_perl/5.8.8/i686-linux/auto/Search/ Xapian/Xapian.so #4 0x080acc85 in Perl_pp_entersub () #5 0x080ab9ae in Perl_runops_standard () #6 0x08060ed0 in perl_run () #7 0x0805dc19 in main () It seems like there's a ref counting problem with the term, but its in C++ templates and I can't quite figure out what's wrong. Any ideas to try? I'm not quite yet re-subscribed to the list yet, but I'm working on it, so please reply directly for now. Thanks, Rusty
Olly Betts
2007-Dec-08 12:02 UTC
[Xapian-devel] Problem indexing text with spelling enabled in Perl
Please don't Cc: me when mailing the lists - I do read the lists, and it won't get you a reply any quicker. On Tue, Nov 13, 2007 at 05:38:43PM -0700, Rusty Conover wrote:> I'm using the TermGenerator::index_text() on version 1.0.4 with the > FLAG_SPELLING turned on, because the new spelling suggestion stuff > seems awesome, but I'm getting a segv.Hmm, TermGenerator::set_flags() doesn't appear to be wrapped for Perl yet, so how are you doing this? Have you patched Search::Xapian? If so, please contribute the patch!> (gdb) bt > #0 0xb7ae153c in Xapian::WritableDatabase::add_spelling > (this=0xa553988, word=@0xbff97724, freqinc=1) at ./include/xapian/ > base.h:154 > #1 0xb7becf47 in Xapian::TermGenerator::Internal::index_text > (this=0xa553970, itor> {p = 0xab2d69f " North Face Windwall 1 Jacket boys", end = > 0xab2d6c1 "", seqlen = 1}, weight=3, prefix=@0xbff977ac, > with_positions=true) > at queryparser/termgenerator_internal.cc:207 > #2 0xb7bebf0c in Xapian::TermGenerator::index_text (this=0x9b12d68, > itor=@0xbff9779c, weight=3, prefix=@0xbff977ac) at queryparser/ > termgenerator.cc:90 > #3 0xb7c6b6d6 in XS_Search__Xapian__TermGenerator_index_text () > from /usr/local/lib/perl5/site_perl/5.8.8/i686-linux/auto/Search/ > Xapian/Xapian.so > #4 0x080acc85 in Perl_pp_entersub () > #5 0x080ab9ae in Perl_runops_standard () > #6 0x08060ed0 in perl_run () > #7 0x0805dc19 in main ()I can't really say from that backtrace as inlining has muddied the location of the SEGV. Do you have an example which reproduces this? Cheers, Olly