JDK-4251406 : FATAL ERROR in native method: Wrong field ID passed to JNI
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-07-02
  • Updated: 1999-07-30
  • Resolved: 1999-07-30
Related Reports
Duplicate :  
Description

Name: krT82822			Date: 07/01/99


I am trying to get the JDK 1.2/non-com sources to work on the digital alpha. I tried to run an IDE called super mojo
via
export CLASSPATH=classes:working:temp:.:lib/classes
sh -x java_g -Xverify:none supermojo.Client

Eventually it gets this interesting error. Interesting is that is I dont use java_g
then supermojo gets beyond this point.

FATAL ERROR in native method: Wrong field ID passed to JNI
        at sun.awt.motif.X11Selection.registerTargetForFlavor(Native Method)
        at sun.awt.motif.X11Selection.<clinit>(X11Selection.java:49)
        at sun.awt.motif.X11Clipboard.<init>(X11Clipboard.java:26)
        at sun.awt.motif.MToolkit.getSystemClipboard(MToolkit.java:322)
        at supermojo.CodeEditor.initialize(Client.java:555)
        at supermojo._DeclarationsEditor.initialize(Client.java)
        at supermojo.Client.<init>(Client.java)
        at supermojo.Client.main(Client.java)
SIGABRT   6*   abort (generated by abort(3) routine)

  From what i can observe from the source, the check in check_jni.c
#define CHECK_INSTANCE_FIELD_ID(env, fb, obj)     if (1) {         ValidateObject(env, obj);         if ((fb->access & ACC_STATIC) ||             !is_subclass_of(obj_classblock(DeRef(env, obj)),                            (fb)->clazz, JNIEnv2EE(env)))             UNCHECKED()->FatalError(env, instance_field_msg);     } else ((void) 0)


the is_subclass_of() failes where the classes do not match, even with that of its parents
(Review ID: 54846) 
======================================================================

Comments
WORK AROUND Name: krT82822 Date: 07/01/99 none, there is something amiss, and appears to be a damerous amiss. ======================================================================
11-06-2004

EVALUATION Commit to fix in Kestrel. eric.hawkes@eng 1999-07-28
28-07-1999