Project: SWT
Bug 57079 [interop] SWT_AWT causes JVM crash
Reported: 2004-04-01 14:29:49 | Status: resolved fixed

My JVM crashes on occasion when closing a wizard that contains a SWT_AWT-based swing JPanel. Can reproduce, however the problem doesn't always occur -- usually 1 of 6 wizard invocations will show the problem. The stack trace displayed by the JVM is not always the same. I've pasted two of them below: java.lang.NullPointerException: null pData at sun.awt.windows.WComponentPeer.hide(Native Method) at java.awt.Component.hide(Unknown Source) at java.awt.Window.hide(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window$1DisposeAction.run(Unknown Source) at java.awt.Window.dispose(Unknown Source) at org.eclipse.swt.awt.SWT_AWT$8.run(SWT_AWT.java:145) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x4886DF0 Function=Java_sun_awt_windows_WColor_getDefaultColor+0x7960 Library=C:\Program Files\Java\j2re1.4.2\bin\awt.dll Current Java thread: at sun.awt.windows.WComponentPeer.removeNativeDropTarget(Native Method) at sun.awt.windows.WComponentPeer.removeDropTarget(Unknown Source) - locked <0x11a42b70> (a sun.awt.windows.WEmbeddedFramePeer) at java.awt.dnd.DropTarget.removeNotify(Unknown Source) at java.awt.Component.removeNotify(Unknown Source) - locked <0x11943120> (a java.awt.Component$AWTTreeLock) at java.awt.Container.removeNotify(Unknown Source) - locked <0x11943120> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.removeNotify(Unknown Source) at javax.swing.text.JTextComponent.removeNotify(Unknown Source) at java.awt.Container.removeNotify(Unknown Source) - locked <0x11943120> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.removeNotify(Unknown Source) at java.awt.Container.removeNotify(Unknown Source) - locked <0x11943120> (a java.awt.Component$AWTTreeLock) at java.awt.Frame.removeNotify(Unknown Source) - locked <0x11943120> (a java.awt.Component$AWTTreeLock) at java.awt.Window$1DisposeAction.run(Unknown Source) at java.awt.Window.dispose(Unknown Source) at org.eclipse.swt.awt.SWT_AWT$8.run(SWT_AWT.java:145) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Dynamic libraries: 0x00400000 - 0x00407000 C:\Program Files\Java\j2re1.4.2\bin\javaw.exe 0x77F50000 - 0x77FF7000 C:\WINDOWS\System32\ntdll.dll 0x77E60000 - 0x77F46000 C:\WINDOWS\system32\kernel32.dll 0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D40000 - 0x77DCC000 C:\WINDOWS\system32\USER32.dll 0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll 0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll 0x76390000 - 0x763AC000 C:\WINDOWS\System32\IMM32.DLL 0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL 0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll 0x08000000 - 0x08136000 C:\Program Files\Java\j2re1.4.2 \bin\client\jvm.dll 0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll 0x10000000 - 0x10007000 C:\Program Files\Java\j2re1.4.2\bin\hpi.dll 0x00830000 - 0x0083E000 C:\Program Files\Java\j2re1.4.2\bin\verify.dll 0x00840000 - 0x00858000 C:\Program Files\Java\j2re1.4.2\bin\java.dll 0x00860000 - 0x0086D000 C:\Program Files\Java\j2re1.4.2\bin\zip.dll 0x02C50000 - 0x02C5F000 C:\Program Files\Java\j2re1.4.2\bin\net.dll 0x71AB0000 - 0x71AC4000 C:\WINDOWS\System32\WS2_32.dll 0x71AA0000 - 0x71AA8000 C:\WINDOWS\System32\WS2HELP.dll 0x02C60000 - 0x02C68000 C:\Program Files\Java\j2re1.4.2\bin\nio.dll 0x03320000 - 0x03368000 C:\Program Files\eclipse3.0M7 \plugins\org.eclipse.swt.win32_3.0.0\os\win32\x86\swt-win32-3038.dll 0x771B0000 - 0x772D1000 C:\WINDOWS\system32\ole32.dll 0x77340000 - 0x773CB000 C:\WINDOWS\system32\COMCTL32.dll 0x763B0000 - 0x763F5000 C:\WINDOWS\system32\comdlg32.dll 0x70A70000 - 0x70AD5000 C:\WINDOWS\system32\SHLWAPI.dll 0x773D0000 - 0x77BC2000 C:\WINDOWS\system32\SHELL32.dll 0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.dll 0x71950000 - 0x71A34000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common- Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll 0x5AD70000 - 0x5ADA4000 C:\WINDOWS\System32\uxtheme.dll 0x63000000 - 0x63014000 C:\WINDOWS\System32\SynTPFcs.dll 0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll 0x03910000 - 0x0393B000 C:\WINDOWS\System32\msctfime.ime 0x03940000 - 0x03948000 C:\Program Files\eclipse3.0M7 \plugins\org.eclipse.core.resources.win32_3.0.0\os\win32\x86\core_2_1_0b.dll 0x74C80000 - 0x74CAC000 C:\WINDOWS\System32\oleacc.dll 0x55900000 - 0x55961000 C:\WINDOWS\System32\MSVCP60.dll 0x746F0000 - 0x74716000 C:\WINDOWS\System32\Msimtf.dll 0x74720000 - 0x74764000 C:\WINDOWS\System32\MSCTF.dll 0x76380000 - 0x76385000 C:\WINDOWS\System32\msimg32.dll 0x03E90000 - 0x03EB4000 C:\Program Files\Trillian\events.dll 0x04810000 - 0x0491A000 C:\Program Files\Java\j2re1.4.2\bin\awt.dll 0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV 0x04A20000 - 0x04A70000 C:\Program Files\Java\j2re1.4.2 \bin\fontmanager.dll 0x51000000 - 0x51047000 C:\WINDOWS\System32\ddraw.dll 0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll 0x5C000000 - 0x5C0C8000 C:\WINDOWS\System32\D3DIM700.DLL 0x71A50000 - 0x71A8B000 C:\WINDOWS\System32\mswsock.dll 0x76F20000 - 0x76F45000 C:\WINDOWS\System32\DNSAPI.dll 0x76FB0000 - 0x76FB7000 C:\WINDOWS\System32\winrnr.dll 0x76F60000 - 0x76F8C000 C:\WINDOWS\system32\WLDAP32.dll 0x76FC0000 - 0x76FC5000 C:\WINDOWS\System32\rasadhlp.dll 0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll 0x6D510000 - 0x6D58D000 C:\WINDOWS\system32\DBGHELP.dll 0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 2752K, used 566K [0x10010000, 0x10300000, 0x104f0000) eden space 2496K, 18% used [0x10010000, 0x10081120, 0x10280000) from space 256K, 44% used [0x10280000, 0x1029c9b0, 0x102c0000) to space 256K, 0% used [0x102c0000, 0x102c0000, 0x10300000) tenured generation total 35536K, used 22062K [0x104f0000, 0x127a4000, 0x14010000) the space 35536K, 62% used [0x104f0000, 0x11a7b808, 0x11a7ba00, 0x127a4000) compacting perm gen total 26368K, used 26352K [0x14010000, 0x159d0000, 0x18010000) the space 26368K, 99% used [0x14010000, 0x159cc220, 0x159cc400, 0x159d0000) Local Time = Thu Mar 25 14:15:31 2004 Elapsed Time = 42 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b19 mixed mode) # # An error report file has been saved as hs_err_pid2500.log. # Please refer to the file for further information. ------------------ java.lang.NullPointerException: null pData at sun.awt.windows.WComponentPeer.hide(Native Method) at java.awt.Component.hide(Unknown Source) at java.awt.Window.hide(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window$1DisposeAction.run(Unknown Source) at java.awt.Window.dispose(Unknown Source) at org.eclipse.swt.awt.SWT_AWT$8.run(SWT_AWT.java:145) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) java.lang.NullPointerException: null pData at sun.awt.windows.WComponentPeer._dispose(Native Method) at sun.awt.windows.WComponentPeer.disposeImpl(Unknown Source) at sun.awt.windows.WWindowPeer.disposeImpl(Unknown Source) at sun.awt.windows.WObjectPeer.dispose(Unknown Source) at java.awt.Component.removeNotify(Unknown Source) at java.awt.Container.removeNotify(Unknown Source) at java.awt.Frame.removeNotify(Unknown Source) at java.awt.Window$1DisposeAction.run(Unknown Source) at java.awt.Window.dispose(Unknown Source) at org.eclipse.swt.awt.SWT_AWT$8.run(SWT_AWT.java:145) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x3E56DF0 Function=Java_sun_awt_windows_WColor_getDefaultColor+0x7960 Library=C:\Program Files\Java\j2re1.4.2\bin\awt.dll Current Java thread: at sun.awt.windows.WToolkit.eventLoop(Native Method) at sun.awt.windows.WToolkit.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Dynamic libraries: 0x00400000 - 0x00407000 C:\Program Files\Java\j2re1.4.2\bin\javaw.exe 0x77F50000 - 0x77FF7000 C:\WINDOWS\System32\ntdll.dll 0x77E60000 - 0x77F46000 C:\WINDOWS\system32\kernel32.dll 0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll 0x77D40000 - 0x77DCC000 C:\WINDOWS\system32\USER32.dll 0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll 0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll 0x76390000 - 0x763AC000 C:\WINDOWS\System32\IMM32.DLL 0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL 0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll 0x08000000 - 0x08136000 C:\Program Files\Java\j2re1.4.2 \bin\client\jvm.dll 0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll 0x10000000 - 0x10007000 C:\Program Files\Java\j2re1.4.2\bin\hpi.dll 0x00830000 - 0x0083E000 C:\Program Files\Java\j2re1.4.2\bin\verify.dll 0x00840000 - 0x00858000 C:\Program Files\Java\j2re1.4.2\bin\java.dll 0x00860000 - 0x0086D000 C:\Program Files\Java\j2re1.4.2\bin\zip.dll 0x02C50000 - 0x02C5F000 C:\Program Files\Java\j2re1.4.2\bin\net.dll 0x71AB0000 - 0x71AC4000 C:\WINDOWS\System32\WS2_32.dll 0x71AA0000 - 0x71AA8000 C:\WINDOWS\System32\WS2HELP.dll 0x02C60000 - 0x02C68000 C:\Program Files\Java\j2re1.4.2\bin\nio.dll 0x03320000 - 0x03368000 C:\Program Files\eclipse3.0M7 \plugins\org.eclipse.swt.win32_3.0.0\os\win32\x86\swt-win32-3038.dll 0x771B0000 - 0x772D1000 C:\WINDOWS\system32\ole32.dll 0x77340000 - 0x773CB000 C:\WINDOWS\system32\COMCTL32.dll 0x763B0000 - 0x763F5000 C:\WINDOWS\system32\comdlg32.dll 0x70A70000 - 0x70AD5000 C:\WINDOWS\system32\SHLWAPI.dll 0x773D0000 - 0x77BC2000 C:\WINDOWS\system32\SHELL32.dll 0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.dll 0x71950000 - 0x71A34000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common- Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll 0x5AD70000 - 0x5ADA4000 C:\WINDOWS\System32\uxtheme.dll 0x63000000 - 0x63014000 C:\WINDOWS\System32\SynTPFcs.dll 0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll 0x03910000 - 0x0393B000 C:\WINDOWS\System32\msctfime.ime 0x03940000 - 0x03948000 C:\Program Files\eclipse3.0M7 \plugins\org.eclipse.core.resources.win32_3.0.0\os\win32\x86\core_2_1_0b.dll 0x74C80000 - 0x74CAC000 C:\WINDOWS\System32\oleacc.dll 0x55900000 - 0x55961000 C:\WINDOWS\System32\MSVCP60.dll 0x746F0000 - 0x74716000 C:\WINDOWS\System32\Msimtf.dll 0x74720000 - 0x74764000 C:\WINDOWS\System32\MSCTF.dll 0x76380000 - 0x76385000 C:\WINDOWS\System32\msimg32.dll 0x03DE0000 - 0x03EEA000 C:\Program Files\Java\j2re1.4.2\bin\awt.dll 0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV 0x04000000 - 0x04050000 C:\Program Files\Java\j2re1.4.2 \bin\fontmanager.dll 0x51000000 - 0x51047000 C:\WINDOWS\System32\ddraw.dll 0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll 0x5C000000 - 0x5C0C8000 C:\WINDOWS\System32\D3DIM700.DLL 0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll 0x6D510000 - 0x6D58D000 C:\WINDOWS\system32\DBGHELP.dll 0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL Heap at VM Abort: Heap def new generation total 2624K, used 737K [0x10010000, 0x102e0000, 0x104f0000) eden space 2368K, 26% used [0x10010000, 0x100ade58, 0x10260000) from space 256K, 41% used [0x10260000, 0x1027a7c0, 0x102a0000) to space 256K, 0% used [0x102a0000, 0x102a0000, 0x102e0000) tenured generation total 33580K, used 20146K [0x104f0000, 0x125bb000, 0x14010000) the space 33580K, 59% used [0x104f0000, 0x1189ca88, 0x1189cc00, 0x125bb000) compacting perm gen total 22784K, used 22717K [0x14010000, 0x15650000, 0x18010000) the space 22784K, 99% used [0x14010000, 0x1563f5d0, 0x1563f600, 0x15650000) Local Time = Wed Mar 24 16:04:03 2004 Elapsed Time = 83 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b19 mixed mode) # # An error report file has been saved as hs_err_pid3744.log. # Please refer to the file for further information. #

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java