[Xapian-discuss] Perl binding: crash & missing functions?

Olly Betts olly@survex.com
Tue, 4 May 2004 14:31:26 +0100


On Sun, May 02, 2004 at 07:00:37PM +0200, Sander Pilon wrote:
> I've been playing with Xapian the last few days, and I got a few problems
> with Perl.
> 
> First of all, when I add +/- 6000 documents (small ones, avg. less then 200
> words) it crashes. 

This should work - I've added millions of documents in a single run from
C++ and never had a crash.

> (It justs quits with "Aborted".)

There are a couple of abort()s in the code - in cases like "this should
never happen" buffer overflows.  You might be seeing an exception which
the perl bindings aren't catching, though it's odd that the problem goes
away with smaller batches.

I think we need to see a full example indexing script (and any sample data)
to be able to track this down.

> The problem is that the Perl binding doesn't seem to support
> set_collapse_key and set_sort_key. I can call them (without errors) but they
> don't seem to do anything.

These methods aren't currently wrapped.  It's not hard to add though,
and Alex is working on the Perl bindings this week so this should be
fixed soon.

I'm suprised you don't get an error - it's bad if someone can misspell a
method name and not be told.  Do you still get no warning or error with
"perl -w" and "use strict"?

Cheers,
    Olly