Project: SWT
Bug 310707 [64] printing to file twice crashes
Reported: 2010-04-27 16:08:45 | Status: resolved fixed

3.6M7 test build - observed on 64-bit Vista, does not happen on same machine with 32-bit eclipse - have not tried it on 64-bit Windows 7 or XP - open any file in eclipse - invoke File -> Print... - check "Print to File", press Print - enter any name, OK --> file is written, fine - invoke File -> Print... again - "Print to File" is already checked, so just press Print - crash usually happens here -> occasionally it can take a third round for the crash to occur I've repeated this several times but only one hs_* file was written out, I'm not sure why. Its content is: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fef91a3eee, pid=3544, tid=3268 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_22-b03 mixed mode) # Problematic frame: # C [WINSPOOL.DRV+0x23eee] # --------------- T H R E A D --------------- Current thread (0x0000000006cde6a0): JavaThread "Printing" [_thread_in_native, id=3268] siginfo: ExceptionCode=0xc0000005, reading address 0x000000000e2605a8 Registers: EAX=0x0000000000000001, EBX=0x000000000038cee0, ECX=0x000000000038cee8, EDX=0x000000000de36900 ESP=0x000000000ecef450, EBP=0x000000000de16d68, ESI=0x0000000000000001, EDI=0x000000000de16d68 EIP=0x000007fef91a3eee, EFLAGS=0x0000000000010206 Top of Stack: (sp=0x000000000ecef450) 0x000000000ecef450: 000000000de36910 000000000de36910 0x000000000ecef460: 0000000000000001 000000000ecef5f0 0x000000000ecef470: 000000000de16d68 000007fef91a64e7 0x000000000ecef480: 0000000000000000 0000000000000000 0x000000000ecef490: 000000000de36250 000000000de16d68 0x000000000ecef4a0: 0000000000000001 000007fef91a6315 0x000000000ecef4b0: 000000000de16d68 000000000de16d68 0x000000000ecef4c0: 0000000000000001 00000000771ef9da 0x000000000ecef4d0: ffffffffe7211227 000007fef91a624a 0x000000000ecef4e0: 000000000de16d68 0000000000000001 0x000000000ecef4f0: 000000000de16d68 0000000000000001 0x000000000ecef500: 000000000ddfe860 000007fefeef687a 0x000000000ecef510: 000000000ddfe860 00000000e4851327 0x000000000ecef520: 0000000000000000 ffffffffe7211227 0x000000000ecef530: 0000000000000000 0000000000000000 0x000000000ecef540: 0000000000000000 0000000000000000 Instructions: (pc=0x000007fef91a3eee) 0x000007fef91a3ede: 48 83 ec 20 48 85 c9 74 2b 48 8d 59 f8 4c 8b 03 0x000007fef91a3eee: 41 81 3c 08 ef be ad de 74 04 33 c0 eb 1b ba 65 Stack: [0x000000000ebf0000,0x000000000ecf0000), sp=0x000000000ecef450, free space=1021k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [WINSPOOL.DRV+0x23eee] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.eclipse.swt.internal.win32.OS.DeleteDC(J)Z+0 j org.eclipse.swt.printing.Printer.destroy()V+13 j org.eclipse.swt.graphics.Device.dispose()V+54 j org.eclipse.jface.text.TextViewer$11.run()V+13 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) =>0x0000000006cde6a0 JavaThread "Printing" [_thread_in_native, id=3268] 0x0000000006cde950 JavaThread "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon [_thread_blocked, id=3080] 0x0000000006cde140 JavaThread "[ThreadPool Manager] - Idle Thread" daemon [_thread_blocked, id=2880] 0x0000000006cdde90 JavaThread "Worker-3" [_thread_blocked, id=1812] 0x0000000006cdd930 JavaThread "Worker-2" [_thread_blocked, id=4000] 0x0000000006fb4e40 JavaThread "Java indexing" daemon [_thread_blocked, id=3076] 0x0000000005c9f7c0 JavaThread "Worker-1" [_thread_blocked, id=1208] 0x0000000008594990 JavaThread "Provisioning Event Dispatcher" daemon [_thread_blocked, id=3920] 0x0000000006b409e0 JavaThread "Worker-0" [_thread_blocked, id=4084] 0x00000000068d4220 JavaThread "Bundle File Closer" daemon [_thread_blocked, id=2896] 0x000000000686bc60 JavaThread "Worker-JM" [_thread_blocked, id=3540] 0x00000000068d25d0 JavaThread "[Timer] - Main Queue Handler" daemon [_thread_blocked, id=3520] 0x00000000068d5190 JavaThread "Framework Event Dispatcher" daemon [_thread_blocked, id=2956] 0x00000000069ce020 JavaThread "Start Level Event Dispatcher" daemon [_thread_blocked, id=4072] 0x00000000066d4bc0 JavaThread "State Data Manager" daemon [_thread_blocked, id=4032] 0x0000000005b97740 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2456] 0x0000000005b92d90 JavaThread "CompilerThread1" daemon [_thread_blocked, id=3452] 0x0000000005b922f0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3228] 0x0000000005b90280 JavaThread "AdapterThread" daemon [_thread_blocked, id=3848] 0x0000000005b8f510 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1908] 0x0000000000a1f500 JavaThread "Finalizer" daemon [_thread_blocked, id=4092] 0x0000000000a1dc60 JavaThread "Reference Handler" daemon [_thread_blocked, id=2584] 0x000000000021eef0 JavaThread "main" [_thread_in_native, id=2344] Other Threads: 0x0000000000a1db40 VMThread [id=3184] 0x0000000005b90140 WatcherThread [id=3708] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 32704K, used 8040K [0x0000000010120000, 0x0000000012490000, 0x0000000018120000) eden space 29120K, 27% used [0x0000000010120000, 0x00000000108fa278, 0x0000000011d90000) from space 3584K, 0% used [0x0000000011d90000, 0x0000000011d90000, 0x0000000012110000) to space 3584K, 0% used [0x0000000012110000, 0x0000000012110000, 0x0000000012490000) tenured generation total 72396K, used 43437K [0x0000000018120000, 0x000000001c7d3000, 0x0000000028120000) the space 72396K, 59% used [0x0000000018120000, 0x000000001ab8b618, 0x000000001ab8b800, 0x000000001c7d3000) compacting perm gen total 66688K, used 66428K [0x0000000028120000, 0x000000002c240000, 0x0000000038120000) the space 66688K, 99% used [0x0000000028120000, 0x000000002c1ff398, 0x000000002c1ff400, 0x000000002c240000) No shared spaces configured. Dynamic libraries: 0x0000000000400000 - 0x000000000040e000 C:\36M7-64\eclipse\eclipse.exe 0x00000000771c0000 - 0x0000000077346000 C:\Windows\system32\ntdll.dll 0x0000000076f60000 - 0x000000007708d000 C:\Windows\system32\kernel32.dll 0x00000000770f0000 - 0x00000000771bd000 C:\Windows\system32\USER32.dll 0x000007fefeee0000 - 0x000007fefef44000 C:\Windows\system32\GDI32.dll 0x000007fefe970000 - 0x000007fefea78000 C:\Windows\system32\ADVAPI32.dll 0x000007fefeb60000 - 0x000007fefeca3000 C:\Windows\system32\RPCRT4.dll 0x000007fefc0f0000 - 0x000007fefc2e9000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6002.18005_none_1509f8bef40ee4da\COMCTL32.dll 0x000007fefda20000 - 0x000007fefdabc000 C:\Windows\system32\msvcrt.dll 0x000007feff440000 - 0x000007feff4b3000 C:\Windows\system32\SHLWAPI.dll 0x000007fefd9e0000 - 0x000007fefda0d000 C:\Windows\system32\IMM32.DLL 0x000007feff1b0000 - 0x000007feff2b2000 C:\Windows\system32\MSCTF.dll 0x000007fefdca0000 - 0x000007fefdcad000 C:\Windows\system32\LPK.DLL 0x000007fefef50000 - 0x000007fefefea000 C:\Windows\system32\USP10.dll 0x0000000072000000 - 0x0000000072012000 C:\36M7-64\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.0.v20100322-1720\eclipse_1307.dll 0x000007fefcb00000 - 0x000007fefcb0b000 C:\Windows\system32\VERSION.dll 0x000007fefc090000 - 0x000007fefc0e1000 C:\Windows\system32\uxtheme.dll 0x0000000010100000 - 0x0000000010111000 C:\Program Files\Logitech\SetPoint\lgscroll.dll 0x0000000073c40000 - 0x0000000073d09000 C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4016_none_88dc01492fb256de\MSVCR80.dll 0x000007fefc740000 - 0x000007fefc76c000 C:\Windows\system32\NTMARTA.DLL 0x000007fefe910000 - 0x000007fefe965000 C:\Windows\system32\WLDAP32.dll 0x000007fefecb0000 - 0x000007fefecf4000 C:\Windows\system32\WS2_32.dll 0x000007fefda10000 - 0x000007fefda17000 C:\Windows\system32\NSI.dll 0x0000000077360000 - 0x0000000077369000 C:\Windows\system32\PSAPI.DLL 0x000007fefcfe0000 - 0x000007fefcffc000 C:\Windows\system32\SAMLIB.dll 0x000007fefed00000 - 0x000007fefeed8000 C:\Windows\system32\ole32.dll 0x000007fefea80000 - 0x000007fefeb53000 C:\Windows\system32\OLEAUT32.DLL 0x0000000008000000 - 0x0000000008562000 C:\36M7-64\eclipse\jre\bin\server\jvm.dll 0x000007fefbc10000 - 0x000007fefbc49000 C:\Windows\system32\WINMM.dll 0x000007fefbbc0000 - 0x000007fefbc0f000 C:\Windows\system32\OLEACC.dll 0x0000000010000000 - 0x000000001000b000 C:\36M7-64\eclipse\jre\bin\hpi.dll 0x00000000001f0000 - 0x0000000000201000 C:\36M7-64\eclipse\jre\bin\verify.dll 0x00000000003b0000 - 0x00000000003dd000 C:\36M7-64\eclipse\jre\bin\java.dll 0x00000000003e0000 - 0x00000000003f6000 C:\36M7-64\eclipse\jre\bin\zip.dll 0x000007fefc7d0000 - 0x000007fefc818000 C:\Windows\system32\rsaenh.dll 0x000007fefd6a0000 - 0x000007fefd6c6000 C:\Windows\system32\USERENV.dll 0x000007fefd680000 - 0x000007fefd69c000 C:\Windows\system32\Secur32.dll 0x0000000002330000 - 0x000000000234b000 C:\36M7-64\eclipse\jre\bin\net.dll 0x000007fefcab0000 - 0x000007fefcaff000 C:\Windows\system32\mswsock.dll 0x000007fefcb30000 - 0x000007fefcb37000 C:\Windows\System32\wship6.dll 0x000007fefb9b0000 - 0x000007fefb9c3000 C:\Windows\system32\NLAapi.dll 0x000007fefcd40000 - 0x000007fefcd63000 C:\Windows\system32\IPHLPAPI.DLL 0x000007fefccf0000 - 0x000007fefcd35000 C:\Windows\system32\dhcpcsvc.DLL 0x000007fefd000000 - 0x000007fefd03a000 C:\Windows\system32\DNSAPI.dll 0x000007fefd4d0000 - 0x000007fefd4da000 C:\Windows\system32\WINNSI.DLL 0x000007fefccc0000 - 0x000007fefcceb000 C:\Windows\system32\dhcpcsvc6.DLL 0x000007fefa110000 - 0x000007fefa123000 C:\Windows\system32\napinsp.dll 0x000007fef9d90000 - 0x000007fef9da7000 C:\Windows\system32\pnrpnsp.dll 0x000007fefa0c0000 - 0x000007fefa0cb000 C:\Windows\System32\winrnr.dll 0x000007fefc6f0000 - 0x000007fefc6f7000 C:\Windows\System32\wshtcpip.dll 0x000007fefa200000 - 0x000007fefa208000 C:\Windows\system32\rasadhlp.dll 0x0000000002350000 - 0x000000000235c000 C:\36M7-64\eclipse\jre\bin\nio.dll 0x000007fef9d50000 - 0x000007fef9d61000 C:\36M7-64\eclipse\configuration\org.eclipse.osgi\bundles\34\1\.cp\jWinHttp-1.0.0.dll 0x000007fefa840000 - 0x000007fefa8b0000 C:\Windows\system32\WINHTTP.dll 0x0000000007300000 - 0x000000000739b000 C:\36M7-64\eclipse\configuration\org.eclipse.osgi\bundles\152\1\.cp\swt-win32-3643.dll 0x000007fefd710000 - 0x000007fefd79c000 C:\Windows\system32\comdlg32.dll 0x000007fefdcb0000 - 0x000007fefe903000 C:\Windows\system32\SHELL32.dll 0x000007feff090000 - 0x000007feff1b0000 C:\Windows\system32\WININET.dll 0x0000000077370000 - 0x0000000077374000 C:\Windows\system32\Normaliz.dll 0x000007feff2c0000 - 0x000007feff437000 C:\Windows\system32\urlmon.dll 0x000007fefd7a0000 - 0x000007fefd9df000 C:\Windows\system32\iertutil.dll 0x0000000002610000 - 0x000000000262e000 C:\36M7-64\eclipse\configuration\org.eclipse.osgi\bundles\152\1\.cp\swt-gdip-win32-3643.dll 0x000007fefbc50000 - 0x000007fefbe6c000 C:\Windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6002.18005_none_56a37cbfb59b8501\gdiplus.dll 0x0000000007e40000 - 0x0000000007e52000 C:\36M7-64\eclipse\configuration\org.eclipse.osgi\bundles\31\1\.cp\os\win32\x86_64\localfile_1_0_0.dll 0x000007fefc700000 - 0x000007fefc707000 C:\Windows\system32\msimg32.dll 0x000007fefeff0000 - 0x000007feff089000 C:\Windows\system32\CLBCatQ.DLL 0x000007fef6f50000 - 0x000007fef6f8d000 C:\Windows\system32\mlang.dll 0x000007fef8450000 - 0x000007fef8524000 C:\Windows\system32\WindowsCodecs.dll 0x000007fefd490000 - 0x000007fefd4c5000 C:\Windows\system32\apphelp.dll 0x000007fefb370000 - 0x000007fefb392000 C:\Windows\system32\EhStorShell.dll 0x000007fefba30000 - 0x000007fefbb15000 C:\Windows\system32\PROPSYS.dll 0x000007fef7cf0000 - 0x000007fef7d98000 C:\Windows\System32\cscui.dll 0x000007fefb3d0000 - 0x000007fefb3dc000 C:\Windows\System32\CSCDLL.dll 0x000007fefb4a0000 - 0x000007fefb4ad000 C:\Windows\System32\CSCAPI.dll 0x000007fef9180000 - 0x000007fef91d8000 C:\Windows\system32\WINSPOOL.DRV 0x000007fef8810000 - 0x000007fef88eb000 C:\Windows\system32\spool\DRIVERS\x64\3\UNIDRVUI.DLL 0x000007fef71a0000 - 0x000007fef7338000 C:\Windows\system32\BROWSEUI.dll 0x000007fefc050000 - 0x000007fefc090000 C:\Windows\system32\DUser.dll 0x000007fef9d30000 - 0x000007fef9d4d000 C:\Windows\system32\thumbcache.dll 0x000007fef70a0000 - 0x000007fef7198000 C:\Windows\system32\ACTXPRXY.DLL 0x000007fef7340000 - 0x000007fef7468000 C:\Windows\system32\SHDOCVW.dll 0x000007fef5310000 - 0x000007fef5ef8000 C:\Windows\system32\ieframe.dll 0x000007fef0ef0000 - 0x000007fef0fe3000 C:\Windows\system32\PRINTUI.dll 0x000007fefa590000 - 0x000007fefa5d5000 C:\Windows\system32\ACTIVEDS.dll 0x000007fefa550000 - 0x000007fefa58c000 C:\Windows\system32\adsldpc.dll 0x000007fefd2c0000 - 0x000007fefd363000 C:\Windows\system32\NETAPI32.dll 0x000007fefa510000 - 0x000007fefa546000 C:\Windows\system32\credui.dll 0x000007fefb8d0000 - 0x000007fefb8e9000 C:\Windows\system32\ATL.DLL 0x000007fefa4a0000 - 0x000007fefa4a9000 C:\Windows\system32\CFGMGR32.dll 0x000007fefdac0000 - 0x000007fefdc9c000 C:\Windows\system32\setupapi.DLL 0x000007fefcf50000 - 0x000007fefcf69000 C:\Windows\system32\MPR.dll 0x000007fef1530000 - 0x000007fef1562000 C:\Windows\system32\puiapi.dll 0x000007fefc5e0000 - 0x000007fefc5ec000 C:\Windows\system32\WTSAPI32.dll 0x000007fefcde0000 - 0x000007fefce09000 C:\Windows\system32\slc.dll 0x000007fef6440000 - 0x000007fef64b6000 C:\Windows\system32\spool\DRIVERS\x64\3\UNIDRV.DLL 0x000007fef44b0000 - 0x000007fef4532000 C:\Windows\system32\mscms.dll VM Arguments: jvm_args: -Xms40m -Xmx384m -XX:MaxPermSize=256m java_command: <unknown> Launcher Type: generic Environment Variables: PATH=C:/36M7-64/eclipse/jre/bin/server;C:/36M7-64/eclipse/jre/bin;C:/36M7-64/eclipse/jre/lib/amd64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Common Files\Lenovo USERNAME=ibmemployee OS=Windows_NT PROCESSOR_IDENTIFIER=Intel64 Family 15 Model 6 Stepping 2, GenuineIntel --------------- S Y S T E M --------------- OS: Windows Vista , 64 bit Build 6002 Service Pack 2 CPU:total 1 em64t ht Memory: 4k page, physical 2084876k(987036k free), swap 4425040k(2936708k free) vm_info: Java HotSpot(TM) 64-Bit Server VM (1.5.0_22-b03) for windows-amd64, built on Oct 9 2009 00:35:21 by "java_re" with unknown MS VC++:1400 time: Tue Apr 27 14:51:07 2010 elapsed time: 110 seconds

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java