[pylucene-dev] pylucene crashes if JVM not initialized
vajda at osafoundation.org
Fri Jun 13 08:32:55 PDT 2008
On Jun 13, 2008, at 6:58 AM, Felix Schwarz
<felix.schwarz at oss.schwarz.eu> wrote:
> currently, pylucene gets a SIGSEGV as soon you call a Java method
> previously initializing the JVM (or attaching the current thread).
> I know the root cause (no initialization) is a programmer error and
> has its reasons to not initialize the JVM automatically.
> But I think pylucene should not crash but just throw a JavaError
> which can
> be catched as every other Python exception.
I tried to implement that a while ago.
The problem is that, to avoid the crash, the generated code has to
check that the VM is initialized all the time and everywhere. I didn't
find a single point of passage where to add that (simple) check.
Adding it everywhere is a lot of code to add for a simple to fix user
No, findClass() is not it, since a class can be loaded by thread and
used by another.
If you have a better idea or a patch, send it in !
> I experienced some crashes because
> my thread configuration was wrong and it was not too easy finding
> the cause.
> Maybe this is already fixed in SVN? I'm using JCC 1.9 and PyLucene
> 184.108.40.206 on
> CentOS 5 (i386) together with OpenJDK (220.127.116.11-0.7.b08.el5.2).
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
More information about the pylucene-dev