[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Possible Problem with JavaHL in 1.3.0 RC2

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-11-02 20:42:04 CET

Mark Phippard <markp@softlanding.com> writes:

> Philip Martin <philip@codematters.co.uk> wrote on 11/02/2005 11:42:48 AM:
>>
>> Perhaps getEnv is returning NULL?
>>
>> The static bool stuff in JNIUtil::JNIInit looks a bit dodgy.
>
> I have done some additional crash scenarios (commit, checkout) and they
> produce the same strack trace.

Do the crashes happen near the start of the operations?

> As I am not a C programmer I cannot really analyze the code, but I would
> think you are right.

If you change the code in isJavaExceptionThrown from

   if (env->ExceptionCheck())

to

   if (env && env->ExceptionCheck())

then it won't crash if env is NULL. However all the other uses of
getEnv assume that NULL is never returned so this isn't really a
solution, it will probably just move the crash somewhere else.

> Perhaps it has something to do with the
> SVN_ASP_DOT_NET_HACK code that was added to the initialization. However,
> none of that code should be compiled in the Linux version so it would seem
> odd.

The SVN_ASP_DOT_NET_HACK code looks innocent to me.

> Also, I am still at a loss to explain what is different about Subclipse
> using this and the test suite, although I imagine it has something to do
> with why it works for some repositories and not others. That being said,
> I hacked up a JUnit test that checks out that URL I have before and it
> works fine. So maybe it is something to do with how the library is
> initialized when it is run from Subclipse?

As I pointed out earlier, the on-the-fly static initialisation in
JNIUtil::JNIInit() looks dodgy to me. Could you arrange for JNIInit
to be called, and for the call to return, by a single thread before
any other calls to JNIInit?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 2 20:44:41 2005

This is an archived mail posted to the Subversion Dev mailing list.