harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Khaschansky" <oleg.v.khaschan...@gmail.com>
Subject Re: [classlib][awt] Test failure
Date Fri, 24 Nov 2006 16:55:37 GMT
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?

The only place is that native code :) I need some time to find out if
it is possible to get the tool which generated it to harmony.

On 11/24/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
> Oleg Khaschansky wrote:
> > I'd suggest to install libxmu.
>
> Surely we can do better than GPF in such circumstances :-)
>
> Where should I modify the code to return gracefully from the native if
> the function is not found (bearing in mind the warning in the source file).
>
> Regards,
> Tim
>
> > On 11/23/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
> >> It looks like the following code (taken from [1]) doesn't allow for a
> >> function address not being found.
> >>
> >> int (* p_nbridge_XmuLookupStandardColormap) (void *, int, long, int,
> >> long, int, int) = NULL;
> >>
> >> JNIEXPORT jint  JNICALL
> >> Java_org_apache_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap(
> >>
> >> 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");
> >>     }
> >>     return (jint) (* p_nbridge_XmuLookupStandardColormap)((void *) dpy,
> >> (int) screen, (long) visualid, (int) depth, (long) property, (int)
> >> replace, (int) retain);
> >> }
> >>
> >>
> >> which I'm guessing is the cause of the recurrent build failure on the
> >> build machine (latest classlib + IBM VM) ...
> >>
> >>
> >> >      [exec]     [junit] Type=Segmentation error vmState=0x00040000
> >> >      [exec]     [junit] J9Generic_Signal_Number=00000004
> >> Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
> >> >      [exec]     [junit] Handler1=402504A4 Handler2=401FD343
> >> InaccessibleAddress=00000000
> >> >      [exec]     [junit] EDI=0816DA90 ESI=0000001B EAX=BB501CA4
> >> EBX=BB501B38
> >> >      [exec]     [junit] ECX=00000000 EDX=081C4C18
> >> >      [exec]     [junit] EIP=00000000 ES=0000007B DS=C010007B
> >> ESP=BFFFD538
> >> >      [exec]     [junit] EFlags=00010282 CS=00000073 SS=0000007B
> >> EBP=BFFFD584
> >> >      [exec]     [junit] Target=2_30_20060727_07300_lHdSMR (Linux
> >> 2.6.8-3-686-smp)
> >> >      [exec]     [junit] CPU=x86 (8 logical CPUs) (0xdcc94000 RAM)
> >>
> >> <snip>
> >>
> >> >      [exec]     [junit] Thread: main (priority 5) (LOCATION OF ERROR)
> >> >      [exec]     [junit]  NATIVE
> >> org/apache/harmony/awt/nativebridge/linux/X11.XmuLookupStandardColormap(JIJIJII)I
> >>
> >> >      [exec]     [junit]  00000080
> >> org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.obtainRGBColorMap()J
> >>
> >> >      [exec]     [junit]  00000015
> >> org/apache/harmony/awt/gl/linux/XGraphicsConfiguration.<init>(Lorg/apache/harmony/awt/gl/linux/XGraphicsDevice;Lorg/apache/harmony/awt/nativebridge/linux/X11$XVisualInfo;)V
> >>
> >> >      [exec]     [junit]  000000a5
> >> org/apache/harmony/awt/gl/linux/XGraphicsDevice.createConfigs()V
> >> >      [exec]     [junit]  00000008
> >> org/apache/harmony/awt/gl/linux/XGraphicsDevice.getConfigs()[Lorg/apache/harmony/awt/gl/linux/XGraphicsConfiguration;
> >>
> >> >      [exec]     [junit]  00000001
> >> org/apache/harmony/awt/gl/linux/XGraphicsDevice.getDefaultConfiguration()Ljava/awt/GraphicsConfiguration;
> >>
> >> >      [exec]     [junit]  0000000f
> >> java/awt/Window.getGraphicsConfiguration(Ljava/awt/GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;
> >>
> >> >      [exec]     [junit]  0000007a
> >> java/awt/Window.<init>(Ljava/awt/Window;Ljava/awt/GraphicsConfiguration;)V
> >>
> >> >      [exec]     [junit]  00000003
> >> java/awt/Frame.<init>(Ljava/lang/String;Ljava/awt/GraphicsConfiguration;)V
> >>
> >> >      [exec]     [junit]  00000003
> >> java/awt/Frame.<init>(Ljava/lang/String;)V
> >> >      [exec]     [junit]  00000003 java/awt/Frame.<init>()V
> >> >      [exec]     [junit]  00000009 java/awt/Graphics2DTest.setUp()V
> >>
> >>
> >> Not sure what has changed to cause this failure.  The file [1] says
> >> /* DO NOT EDIT THIS FILE - it is based on X11 headers and was
> >> autogenerated by nativebridge tool */
> >>
> >> so I'm guessing I can't fix it up there.  suggestions?
> >>
> >>
> >> [1]
> >> http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_X11.cpp?revision=476395&view=markup
> >>
> >>
> >> Regards,
> >> Tim
> >>
> >> --
> >>
> >> Tim Ellison (t.p.ellison@gmail.com)
> >> IBM Java technology centre, UK.
> >>
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>

Mime
View raw message