JDK-4228055 : 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: solaris_2.6
  • CPU: sparc
  • Submitted: 1999-04-08
  • Updated: 1999-04-09
  • Resolved: 1999-04-09
Related Reports
Duplicate :  
Description
mm8553      review ID: 56713

I executed the "Notepad" demo, opened a file
and highlighted some text. The JVM exited with
the following message when I tried to COPY
(pressing the COPY ICON) the selected text
into the clipboard:

# Hotspot Virtual Machine Error, Unexpected exception occured
#
# signal = 10, pc=ef23db50

--------------------------

8 apr 99 mrm@eng Marianne Mueller: 

This demo is found in jdk1.2.1/demo/jfc/Notepad

This isn't a Hotspot bug, but seems to be an AWT bug.
The crash happens with -classic as well as with hotspot. 

Running with java_g on Solaris 2.6,  (doesn't happen with win32)

puffin% java_g Notepad
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>(Compiled Code)
	at sun.awt.motif.MToolkit.getSystemClipboard(Compiled Code)
	at javax.swing.text.JTextComponent.copy(Compiled Code)
	at javax.swing.text.DefaultEditorKit$CopyAction.actionPerformed(Compiled Code)
	at javax.swing.AbstractButton.fireActionPerformed(Compiled Code)
	at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Compiled Code)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Compiled Code)
	at javax.swing.DefaultButtonModel.setPressed(Compiled Code)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Compiled Code)
	at java.awt.AWTEventMulticaster.mouseReleased(Compiled Code)
	at java.awt.Component.processMouseEvent(Compiled Code)
	at java.awt.Component.processEvent(Compiled Code)
	at java.awt.Container.processEvent(Compiled Code)
	at java.awt.Component.dispatchEventImpl(Compiled Code)
	at java.awt.Container.dispatchEventImpl(Compiled Code)
	at java.awt.Component.dispatchEvent(Compiled Code)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
	at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
	at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
	at java.awt.Container.dispatchEventImpl(Compiled Code)
	at java.awt.Window.dispatchEventImpl(Compiled Code)
	at java.awt.Component.dispatchEvent(Compiled Code)
	at java.awt.EventQueue.dispatchEvent(Compiled Code)
	at java.awt.EventDispatchThread.run(Compiled Code)
SIGABRT   6*   abort (generated by abort(3) routine)
    si_signo [6]: SIGABRT   6*   abort (generated by abort(3) routine)

*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure


*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure

    si_errno [0]: Error 0
    si_code [0]: SI_USER [pid: 14420, uid: 9553]
	stackpointer=ea9fdbac

*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure


*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure


Full thread dump Classic VM (JDK-1.2.1-A, green threads):
    "AWT-Finalizer" (TID:0xebccb0c8, sys_thread_t:0x6258e8, state:CW) prio=9
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Compiled Code)
	at sun.awt.AWTFinalizer.run(Compiled Code)
    "Screen Updater" (TID:0xebca35f0, sys_thread_t:0x619e18, state:CW) prio=4
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Compiled Code)
	at sun.awt.ScreenUpdater.nextEntry(Compiled Code)
	at sun.awt.ScreenUpdater.run(Compiled Code)
    "TimerQueue" (TID:0xebcc31b0, sys_thread_t:0x4ac638, state:CW) prio=5
	at java.lang.Object.wait(Native Method)
	at javax.swing.TimerQueue.run(Compiled Code)
	at java.lang.Thread.run(Compiled Code)
    "AWT-Motif" (TID:0xebcb2ca0, sys_thread_t:0x35d7b8, state:R) prio=5
	at sun.awt.motif.MToolkit.run(Native Method)
	at java.lang.Thread.run(Compiled Code)
    "SunToolkit.PostEventQueue-0" (TID:0xebcb2488, sys_thread_t:0x327ee0, state:R) prio=5
	at java.awt.EventQueue.postEvent(Compiled Code)
	at sun.awt.PostEventQueue.run(Compiled Code)
    "AWT-EventQueue-0" (TID:0xebcb2450, sys_thread_t:0x327da8, state:R) prio=6
	at sun.awt.motif.X11Selection.registerTargetForFlavor(Native Method)
	at sun.awt.motif.X11Selection.<clinit>(X11Selection.java:49)
	at sun.awt.motif.X11Clipboard.<init>(Compiled Code)
	at sun.awt.motif.MToolkit.getSystemClipboard(Compiled Code)
	at javax.swing.text.JTextComponent.copy(Compiled Code)
	at javax.swing.text.DefaultEditorKit$CopyAction.actionPerformed(Compiled Code)
	at javax.swing.AbstractButton.fireActionPerformed(Compiled Code)
	at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Compiled Code)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Compiled Code)
	at javax.swing.DefaultButtonModel.setPressed(Compiled Code)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Compiled Code)
	at java.awt.AWTEventMulticaster.mouseReleased(Compiled Code)
	at java.awt.Component.processMouseEvent(Compiled Code)
	at java.awt.Component.processEvent(Compiled Code)
	at java.awt.Container.processEvent(Compiled Code)
	at java.awt.Component.dispatchEventImpl(Compiled Code)
	at java.awt.Container.dispatchEventImpl(Compiled Code)
	at java.awt.Component.dispatchEvent(Compiled Code)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
	at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
	... (more frames not shown)
    "Finalizer" (TID:0xebc98328, sys_thread_t:0x6a4b0, state:CW) prio=8
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(Compiled Code)
	at java.lang.ref.ReferenceQueue.remove(Compiled Code)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
    "Reference Handler" (TID:0xebc983b8, sys_thread_t:0x66730, state:CW) prio=10
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Compiled Code)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:114)
    "Signal dispatcher" (TID:0xebc983e8, sys_thread_t:0x5ee98, state:CW) prio=5
    "Thread-0" (TID:0xebc9f5f0, sys_thread_t:0x26798, state:CW) prio=5
Monitor Cache Dump:
    javax.swing.TimerQueue@EBCC31D8/EBDFADA0: <unowned>
	Waiting to be notified:
	    "TimerQueue" (0x4ac638)
    sun.awt.ScreenUpdater@EBCA35F0/EBE8FAD8: <unowned>
	Waiting to be notified:
	    "Screen Updater" (0x619e18)
    java.lang.ref.ReferenceQueue$Lock@EBC98340/EBCCE170: <unowned>
	Waiting to be notified:
	    "Finalizer" (0x6a4b0)
    java.lang.Class@EBCACE58/EBD26730: owner "AWT-EventQueue-0" (0x327da8) 1 entry
    sun.awt.AWTFinalizer@EBCCB0C8/EBF9DF60: <unowned>
	Waiting to be notified:
	    "AWT-Finalizer" (0x6258e8)
    java.lang.ref.Reference$Lock@EBC983C8/EBCCDC40: <unowned>
	Waiting to be notified:
	    "Reference Handler" (0x66730)
Registered Monitor Dump:
    PCMap lock: <unowned>
    utf8 hash table: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class linking lock: <unowned>
    System class loader lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Monitor cache lock: owner "AWT-EventQueue-0" (0x327da8) 1 entry
    Dynamic loading lock: <unowned>
    Monitor IO lock: <unowned>
    User signal monitor: <unowned>
	Waiting to be notified:
	    "Signal dispatcher" (0x5ee98)
    Child death monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
	Waiting to be notified:
	    <unknown thread> (0x2ba88)
    Thread queue lock: owner "AWT-EventQueue-0" (0x327da8) 1 entry
	Waiting to be notified:
	    "Thread-0" (0x26798)
    Monitor registry: owner "AWT-EventQueue-0" (0x327da8) 1 entry


*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


*** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure

Abort (core dumped)

Comments
PUBLIC COMMENTS FATAL ERROR in native method: Wrong field ID passed to JNI
10-06-2004