I had a bug in some code last night where I accidentally
passed in the integer 1 into getFields() and this caused
Python to abort and exit out. Is this behavior expected? I
don't have access to any machines that can run the
precompiled binaries so hopefully there's nothing weird w/
the compiler tools I used.
Here's a minimal amount of code that reproduces the issue.
I can get the following to crash using both PyLucene 1.9 and
PyLucene 1.0.1 (both compiled from source):
import PyLucene
d = PyLucene.Document()
f = PyLucene.Field('breed', 'bulldog', True, True, True)
d.add(f)
print 'Test 1: ', d.getFields('breed') # Works
print 'Test 2: ', d.getFields('1') # Works
print 'Test 3: ', d.getFields(1) # Crashes
print 'ALL DONE'
The output is as follows:
$ python2.4 bug.py
Test 1: [<PyLucene.Field; proxy of C++
org::apache::lucene::document::Field instance at <PyCObject object at
0xb7a38068>>]
Test 2: None
Test 3: Aborted
$
Here's the system / tools I used:
OS: Debian GNU/Linux Stable (Sarge)
Kernel: 2.6.11.9
CPU: Pentium 4 / 2.8 GHz
Memory: 250MB
Python 2.4.1
gcj 3.4.4
SWIG 1.3.24
PyLucene 1.9 and 1.0.1 (tested seperately)
Python, GCJ, and SWIG are provided by standard Debian
packages.
-matthew
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev