JDK-6986968 : Crash on XIM server restart
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: OpenJDK6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_redhat_5.0
  • CPU: x86
  • Submitted: 2010-09-23
  • Updated: 2011-05-17
  • Resolved: 2011-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b114Fixed
Description
The code in awt_InputMethod.c guards against the XIM server going away, but does not guard against it appearing again. When the XIM server is restarted, the X server can send async requests to call OpenXIMCallback in Java automatically:
(gdb) bt
#0  OpenXIMCallback (display=<value optimized out>,
    client_data=<value optimized out>, call_data=<value optimized out>)
    at ../../../src/solaris/native/sun/awt/awt_InputMethod.c:1464
#1  0x00000036b406dc4f in _XimFilterPropertyNotify (display=0x7f503c0df300,
    window=<value optimized out>, event=<value optimized out>,
    client_data=<value optimized out>) at imInsClbk.c:126
#2  0x00007f4ff24f0f3f in Java_sun_awt_X11_XlibWrapper_XFilterEvent (
    env=<value optimized out>, clazz=<value optimized out>,
    ptr=<value optimized out>, window=<value optimized out>)
    at ../../../src/solaris/native/sun/xawt/XlibWrapper.c:486
#3  0x00007f5039010f50 in ?? ()
#4  0x00007f5039005953 in ?? ()
#5  0x0000000000000000 in ?? ()

This causes the X11im pointer to get initialized and the checks in getX11InputMethodData are escaped. The patch simply makes sure that the checks are not escaped by calling getX11InputMethodData in DestroyXIMCallback.

Comments
EVALUATION The fix was pushed by the contributor: http://hg.openjdk.java.net/jdk7/swing/jdk/rev/bbadb9484f53
28-09-2010