harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivanov, Alexey A" <alexey.a.iva...@intel.com>
Subject RE: [classlib][awt] Test failure
Date Mon, 27 Nov 2006 08:04:31 GMT
Tim, Oleg, Geir, all,

Some tests also fail because of this problem. See comments in
HARMONY-1439 [1] and HARMONY-1979 [2]. The one that regards to this
particular problem reads:

"Mark Hindess [26/Oct/06 01:19 PM]
Hmm... looks like the problem I'm having is because:
  FindFunction(libXmu, "XmuLookupStandardColormap");

returns NULL. No idea why since libXmu is installed and seems to contain
that symbol. This is a debian/stable machine."


Regards,
Alexey.

[1] https://issues.apache.org/jira/browse/HARMONY-1439
[2] https://issues.apache.org/jira/browse/HARMONY-1979

--
Alexey A. Ivanov
Intel Enterprise Solutions Software Division


>-----Original Message-----
>From: Geir Magnusson Jr. [mailto:geir@pobox.com]
>Sent: Sunday, November 26, 2006 12:46 AM
>To: dev@harmony.apache.org
>Subject: Re: [classlib][awt] Test failure
>
>
>
>Tim Ellison wrote:
>> Oleg Khaschansky wrote:
>>> Do you suggest to introduce the error handling for all the wrappers
or
>>> only for this one? If for all, do you think if it will affect the
>>> performance?
>>
>> I was thinking of something like this.  In the non-error case it
would
>> add an additional NULL check as the function address is being cached,
>> and no additional overhead after the cache has been populated.
>>
>> The actual exception thrown is open to debate.\
>
>:)
>
>I don't understand the context - in the event of this fault, is it time
>to simply shut down?  Or is this survivable?  My understanding is that
>you just don't want to see a GPF.
>
>Either way, how about a hint - like "missing libxmu" or similar?
>
>geir
>
>>
>> Index:
>>
>src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_li
nux_
>X11.cpp
>> ===================================================================
>> ---
>>
>src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_li
nux_
>X11.cpp
>> (revision 478891)
>> +++
>>
>src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_li
nux_
>X11.cpp
>> (working copy)
>> @@ -23,6 +23,7 @@
>>
>>  #include "org_apache_harmony_awt_nativebridge_linux_X11.h"
>>  #include "org_apache_harmony_awt_nativebridge_linux_ErrorHandler.h"
>> +#include "exceptions.h"
>>
>>  static libHandler libX11;
>>  static libHandler libXmu;
>> @@ -575,6 +576,10 @@
>>  JNIEXPORT jint  JNICALL
>>
>Java_org_apache_harmony_awt_nativebridge_linux_X11_XmuLookupStandardCol
orma
>p(
>> JNIEnv *env, jobject self, jlong dpy, jint screen, jlong visualid,
jint
>> depth, jlong property, jint replace, jint retain) {
>>      if (p_nbridge_XmuLookupStandardColormap == NULL) {
>>          p_nbridge_XmuLookupStandardColormap = (int (*) (void *, int,
>> long, int, long, int, int)) FindFunction(libXmu,
>> "XmuLookupStandardColormap");
>> +        if (p_nbridge_XmuLookupStandardColormap == NULL) {
>> +            throwNewExceptionByName(env,
>> "java/lang/UnsupportedOperationException", "Function not found");
>> +            return 0;
>> +		}
>>      }
>>      return (jint) (* p_nbridge_XmuLookupStandardColormap)((void *)
dpy,
>> (int) screen, (long) visualid, (int) depth, (long) property, (int)
>> replace, (int) retain);
>>  }
>>
>>
>> What do you think?
>>
>> Regards,
>> Tim
>>

Mime
View raw message