JDK-4862593 : JVM crash when dragging from Java UI component to natively rendered window/peer
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2003-05-12
  • Updated: 2004-09-16
  • Resolved: 2003-08-07
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.
Other
1.4.2_02 02Fixed
Related Reports
Relates :  
Description
An ISV uses the techniques outlined in http://java.sun.com/j2se/1.3/docs/guide/awt/AWT_Native_Interface.html for rendering to a Java window via Native Code.  The native code rendering is OpenGL-based, and JNI is used for Java - native integration.

When the mouse is dragged from a Java UI component (e.g., Swing, AWT) to the native window with native code rendering, the JVM crashes immediately in 1.4.x (1.4.1_01-b01, 1.4.1_02-b06, 1.4.2-beta-b19).  Note that the problem does not occur in 1.3.1_07/_08.

The problem has variously been present (and fixed/absent) since 1.2.x.

This problem was first reported in bug id #4413973, and the fix incorporated for that bug was reportedly included in the 1.4.x tree; however that fix does not address this problem.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_02 tiger FIXED IN: 1.4.2_02 tiger INTEGRATED IN: 1.4.2_02 tiger tiger-b15
17-09-2004

EVALUATION Commit to fix in Tiger. ###@###.### 2003-05-12 The problem is due to an invalid object is being passed to awt_post_java_mouse_event() and subsequently crashes in jni_GetObjectClass. I've attached a native stack trace with line numbers corresponding to 1.4.1_04 in the attachment (native.txt). The fix is to check if the current widget is of AWT type. The cause for this bug is that the fix for 4413973 wasn't forward ported correctly from 1.2.2/1.3 to 1.4/1.4.1/1.4.2. ###@###.### 2003-07-09
09-07-2003

SUGGESTED FIX --- canvas.c Thu Jul 3 09:25:16 2003 *** 1,7 **** /* ! * @(#)canvas.c 1.212 03/04/25 * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ --- 1,7 ---- /* ! * @(#)canvas.c 1.213 03/07/03 * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ *** 1935,1945 **** java_awt_event_MouseEvent_NOBUTTON); } } if ((currentWidget != NULL) && (currentWidget != w) && ! (currentWidget != prevWidget) && awt_isAwtWidget(prevWidget)) { XtPointer userData=NULL; XtVaGetValues(currentWidget, XmNuserData, &userData, NULL); if (userData) { awt_post_java_mouse_event(userData, java_awt_event_MouseEvent_MOUSE_ENTERED, --- 1935,1945 ---- java_awt_event_MouseEvent_NOBUTTON); } } if ((currentWidget != NULL) && (currentWidget != w) && ! (currentWidget != prevWidget) && awt_isAwtWidget(currentWidget)) { XtPointer userData=NULL; XtVaGetValues(currentWidget, XmNuserData, &userData, NULL); if (userData) { awt_post_java_mouse_event(userData, java_awt_event_MouseEvent_MOUSE_ENTERED, ###@###.### 2003-07-09
09-07-2003