United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6312028 : 1.4.2_08 crash in awt!AwtObject::SendEvent

Details
Type:
Bug
Submit Date:
2005-08-17
Status:
Resolved
Updated Date:
2014-02-27
Project Name:
JDK
Resolved Date:
2006-04-11
Component:
client-libs
OS:
windows_xp
Sub-Component:
java.awt
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2_08
Fixed Versions:
1.4.2_12 (b02)

Related Reports

Sub Tasks

Description
Customer is running an applet and JVM crashed.
They have tried running the application with the following flags and the JVM still crashes.
1.4.2_08 + -Dsun.java2d.d3d=false
          -Dsun.java2d.ddoffscreen=false
          -Dsun.java2d.noddraw=true

The application worked fine with 1.5.0_03.
0635f698 0807cb75 05b2ee78 00000000 00000000 jvm!jni_GetObjectClass+0x1e [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\prims\jni.cpp @ 838]
0635f6b4 0183460c 05b2ee78 00000000 0d2885f0 jvm!checked_jni_GetObjectClass+0xb2 [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\prims\jniCheck.cpp @ 690]
0635f6d8 018345d1 05b2ee78 00000000 00000000 java!JNU_CallMethodByNameV+0x39 [../../../src/share/native/common/jni_util.c @ 293]
0635f6f8 05d1a3ad 05b2ee78 00000000 00000000 java!JNU_CallMethodByName+0x1b [../../../src/share/native/common/jni_util.c @ 266]
0635f71c 05d2a1da 00000000 77e3d142 0d2885f0 awt!AwtObject::SendEvent+0x2f [../../../src/windows/native/sun/windows/awt_Object.cpp @ 116]
0635f73c 05d14212 000000cf 00150504 00000000 awt!AwtWindow::SendWindowEvent+0x1da [../../../src/windows/native/sun/windows/awt_Window.cpp @ 624]
0635f758 05d03b4f 00000001 00000000 00150504 awt!AwtFrame::WmActivate+0x4c [../../../src/windows/native/sun/windows/awt_Frame.cpp @ 683]
0635f790 05d0f382 00000006 00000001 00150504 awt!AwtComponent::WindowProc+0x20f [../../../src/windows/native/sun/windows/awt_Component.cpp @ 1396]
0635f7a8 05d02d18 00000006 00000001 00150504 awt!AwtDialog::WindowProc+0x40 [../../../src/windows/native/sun/windows/awt_Dialog.cpp @ 645]
0635f7d8 77cf3a50 01cb066e 00000006 00000001 awt!AwtComponent::WndProc+0x58 [../../../src/windows/native/sun/windows/awt_Component.cpp @ 321]
0635f804 77cf3b1f 05d02cc0 01cb066e 00000006 user32!InternalCallWinProc+0x1b
0635f86c 77cf44f5 00000000 05d02cc0 01cb066e user32!UserCallWinProcCheckWow+0x150
0635f8c0 77cf4525 006ad100 00000006 00000001 user32!DispatchClientMessage+0xa3
0635f8e8 77f75da3 0635f8f8 00000018 006ad100 user32!__fnDWORD+0x22
0635f90c 77cf7998 77d18dda 017f0648 006af230 ntdll!KiUserCallbackDispatcher+0x13
0635f990 77cfdc6c 017f0648 00000201 00000000 user32!NtUserSetFocus+0xc
0635f9b0 77cf3a50 017f0648 00000201 00000000 user32!ButtonWndProcW+0x5b
0635f9dc 77cf3b1f 77cfdc22 017f0648 00000201 user32!InternalCallWinProc+0x1b
0635fa44 77cf5b2c 00000000 77cfdc22 017f0648 user32!UserCallWinProcCheckWow+0x150
0635fa74 77cf5b4b 77cfdc22 017f0648 00000201 user32!CallWindowProcAorW+0x96
0635fa94 05d04cb1 77cfdc22 017f0648 00000201 user32!CallWindowProcW+0x19
0635faac 05d09986 00000201 00000000 00030003 awt!AwtComponent::DefWindowProcA+0x21 [../../../src/windows/native/sun/windows/awt_Component.cpp @ 1811]
0635fac0 05d00005 0764adf0 00000001 00008009 awt!AwtComponent::HandleEvent+0x16 [../../../src/windows/native/sun/windows/awt_Component.cpp @ 5769]
0635fafc 77cf400a 05d02cbd 05d02d18 00008009 awt!AwtButton::HandleEvent+0x8b [../../../src/windows/native/sun/windows/awt_Button.cpp @ 285]
0635fb34 77cf3a50 017f0648 00008009 00000001 user32!GetWindowLongA+0x49
0635fb60 77cf3b1f 05d02cc0 017f0648 00008009 user32!InternalCallWinProc+0x1b
0635fbc8 77cf3d79 00000000 05d02cc0 017f0648 user32!UserCallWinProcCheckWow+0x150
0635fc28 77cf3ddf 0635fc50 00000000 05d276fb user32!DispatchMessageWorker+0x306
0635fc34 05d276fb 0635fc50 05d27770 05d6e058 user32!DispatchMessageW+0xb
0635fc68 05d27565 05d27770 05b2ede0 4364c3b0 awt!AwtToolkit::PumpWaitingMessages+0x4b [../../../src/windows/native/sun/windows/awt_Toolkit.cpp @ 1070]
0635fc7c 05d2837e 05d27740 05d27770 05b2ede0 awt!AwtToolkit::MessageLoop+0x25 [../../../src/windows/native/sun/windows/awt_Toolkit.cpp @ 963]
0635fd58 08071309 0635fd8c 0635ff38 0000000a awt!Java_sun_awt_windows_WToolkit_eventLoop+0x4e [../../../src/windows/native/sun/windows/awt_Toolkit.cpp @ 1653]
0635fdd8 080ac21e 0000000a 00000000 0635fe90 jvm!JavaCalls::call_helper+0xee [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\runtime\javaCalls.cpp @ 373]
0635fe1c 08071216 0807121b 0635ff30 0635fe44 jvm!os::os_exception_wrapper+0x5e [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\os_cpu\win32_i486\vm\os_win32_i486.cpp @ 53]
0635fe38 08070f12 0635ff30 05b2f374 0635fe90 jvm!JavaCalls::call+0x43 [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\runtime\javaCalls.cpp @ 300]
0635fe70 08070f4b 0635ff30 05b2f364 08123e10 jvm!JavaCalls::call_virtual+0x6c [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\runtime\javaCalls.cpp @ 187]
0635feec 08089d3a 0635ff30 05b2f360 05b2f364 jvm!JavaCalls::call_virtual+0x31 [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\runtime\javaCalls.cpp @ 193]
0635ff40 080cff57 05b2ede0 05b2ede0 05b2ede0 jvm!thread_entry+0x6b [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\prims\jvm.cpp @ 1848]
0635ff6c 080cff25 05b2ede0 080aa59c 05b2f7b8 jvm!JavaThread::thread_main_inner+0x30 [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\runtime\thread.cpp @ 1136]
0635ff74 080aa59c 05b2f7b8 0635ffb4 77be7fb8 jvm!JavaThread::run+0x7d [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\runtime\thread.cpp @ 1120]
0635ff80 77be7fb8 05b2ede0 00000012 003709e8 jvm!_start+0xe [D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\os\win32\vm\os_win32.cpp @ 290]
0635ffb4 77e3d33b 05b29578 00000012 003709e8 msvcrt!_endthreadex+0xa0
0635ffec 00000000 77be7f49 05b29578 00000000 kernel32!BaseThreadStart+0x37

                                    

Comments
EVALUATION

We don't have a testcase yet from the customer on reproducing the problem.
Looking at the native stack trace and after providing instrumented build to the customer, it appears that a windows message is being sent to a window(frame) after it's destroyed which results in a crash eventually.
Further investigation on progress.
                                     
2005-12-07
EVALUATION

This is probably a race condition happening at the customer's site which we haven't been able to reproduce even once.
The awt native code certainly needs NULL check for peer object and validity of hwnd at various places (awt_Object.cpp, awt_Component.cpp, awt_Window.cpp ....)
This has been done in mustang but backporting it to any of the earlier releases is a herculean task due to large changes made and also due to the differences in the source code.
                                     
2005-12-29



Hardware and Software, Engineered to Work Together