[pylucene-dev] segmentation fault with jcc build
Andi Vajda
vajda at osafoundation.org
Thu Oct 25 13:03:59 PDT 2007
On Thu, 25 Oct 2007, Phil Christensen wrote:
> BTW, I realize this class cannot be instantiated, I get the same result this
> way:
>
> Python 2.4.4 (#2, Apr 5 2007, 20:11:18)
> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import lucene
>>>> directory = lucene.FSDirectory.getDirectory('lucene', False)
> Segmentation fault
Try:
>>> import lucene
>>> lucene.initVM(lucene.CLASSPATH)
>>> directory = lucene.FSDirectory.getDirectory('lucene', False)
Why isn't initVM() called automatically ?
Well, as is explained in JCC's README, there are many options a VM can be
configured with that it seemed preferable to let the user do it.
Also, the VM can be initialized only once for a given process, doing a default
init would be in the way. Lazily doing it would add a call in lots of places
too.
Andi..
More information about the pylucene-dev
mailing list