Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

print in Swing  RSS feed

 
nesta fdb
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I code a frame with Swing , in the frame provide the printing function. If I select a valid printer, it runs well. But if I select an invalid printer, the frame will be closed.

Enviroment:
JDK1.4.1
Win2K Professional

Errors shows that the exception happens out of the JVM, so JVM can't catch it, then it leads to close all frame, exit from application.

concrete errors as follows:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x15957E67
Function=[Unknown.]
Library=C:\WINNT\system32\spool\DRIVERS\W32X86\3\CAP3K.DLL

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.


Current Java thread:
at sun.awt.windows.WPrinterJob.textOut(Native Method)
at sun.awt.windows.WPrinterJob.textOut(WPrinterJob.java:905)
at sun.awt.windows.WPathGraphics.drawString(WPathGraphics.java:391)
at sun.awt.windows.WPathGraphics.drawString(WPathGraphics.java:219)
at com.netstrong.nms.topogui2.TopoGraph$TopoGraphUI.paintBackground(TopoGraph.java:3094)
at com.jgraph.plaf.basic.BasicGraphUI.paint(BasicGraphUI.java:883)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
at javax.swing.JComponent.paintComponent(JComponent.java:541)
at javax.swing.JComponent.printComponent(JComponent.java:908)
at javax.swing.JComponent.paint(JComponent.java:812)
at javax.swing.JComponent.print(JComponent.java:891)
at com.netstrong.nms.topogui2.PrintFactory.topoGraphScale(PrintFactory.java:51)
at com.netstrong.nms.topogui2.PrintFactory$PrintableImpl.print(PrintFactory.java:153)
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1506)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1078)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:979)
at com.netstrong.nms.topogui2.TopoGraph$ThreadPrint.run(TopoGraph.java:3011)

Dynamic libraries:
0x00400000 - 0x00406000 E:\Program Files\JBuilder8\jdk1.4\bin\javaw.exe
0x77F80000 - 0x77FFB000 C:\WINNT\system32\ntdll.dll
0x796D0000 - 0x79732000 C:\WINNT\system32\ADVAPI32.dll
0x77E60000 - 0x77F38000 C:\WINNT\system32\KERNEL32.DLL
0x786F0000 - 0x7875E000 C:\WINNT\system32\RPCRT4.DLL
0x77DF0000 - 0x77E55000 C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
0x78000000 - 0x78045000 C:\WINNT\system32\MSVCRT.dll
0x75E00000 - 0x75E1A000 C:\WINNT\system32\IMM32.DLL
0x6D330000 - 0x6D45C000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\client\jvm.dll
0x77530000 - 0x77560000 C:\WINNT\system32\WINMM.dll
0x6D1D0000 - 0x6D1D7000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\verify.dll
0x6D210000 - 0x6D229000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\java.dll
0x6D320000 - 0x6D32D000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\zip.dll
0x6D000000 - 0x6D0FA000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\awt.dll
0x777C0000 - 0x777DE000 C:\WINNT\system32\WINSPOOL.DRV
0x79A90000 - 0x79AA1000 C:\WINNT\system32\MPR.DLL
0x77A30000 - 0x77B1C000 C:\WINNT\system32\ole32.dll
0x6D180000 - 0x6D1D0000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\fontmanager.dll
0x72760000 - 0x727A6000 C:\WINNT\system32\ddraw.dll
0x72800000 - 0x72806000 C:\WINNT\system32\DCIMAN32.dll
0x72CF0000 - 0x72D63000 C:\WINNT\system32\D3DIM.DLL
0x12F30000 - 0x12F83000 C:\PROGRA~1\3721\Ces\cmail.dll
0x77B30000 - 0x77BB9000 C:\WINNT\system32\COMCTL32.dll
0x78F90000 - 0x791D8000 C:\WINNT\system32\SHELL32.dll
0x77C50000 - 0x77C9A000 C:\WINNT\system32\SHLWAPI.DLL
0x77990000 - 0x77A2B000 C:\WINNT\system32\OLEAUT32.dll
0x777E0000 - 0x777E7000 C:\WINNT\system32\VERSION.dll
0x75950000 - 0x75956000 C:\WINNT\system32\LZ32.DLL
0x60000000 - 0x60045000 C:\WINNT\system32\MSCTF.dll
0x53000000 - 0x53007000 C:\PROGRA~1\3721\helper.dll
0x37210000 - 0x37246000 C:\WINNT\downlo~1\CnsMin.dll
0x6D2D0000 - 0x6D2DE000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\net.dll
0x74FD0000 - 0x74FDA000 C:\WINNT\system32\WSOCK32.dll
0x74FB0000 - 0x74FC4000 C:\WINNT\system32\WS2_32.DLL
0x74FA0000 - 0x74FA8000 C:\WINNT\system32\WS2HELP.DLL
0x77800000 - 0x7780C000 C:\WINNT\System32\rnr20.dll
0x77960000 - 0x77984000 C:\WINNT\system32\DNSAPI.DLL
0x77300000 - 0x77313000 C:\WINNT\system32\iphlpapi.dll
0x774E0000 - 0x774E5000 C:\WINNT\system32\ICMP.DLL
0x772E0000 - 0x772F7000 C:\WINNT\system32\MPRAPI.DLL
0x750E0000 - 0x750EF000 C:\WINNT\system32\SAMLIB.DLL
0x75100000 - 0x7514F000 C:\WINNT\system32\NETAPI32.DLL
0x797B0000 - 0x797BF000 C:\WINNT\system32\SECUR32.DLL
0x75150000 - 0x75156000 C:\WINNT\system32\NETRAP.DLL
0x77930000 - 0x7795A000 C:\WINNT\system32\WLDAP32.DLL
0x77370000 - 0x7739F000 C:\WINNT\system32\ACTIVEDS.DLL
0x77340000 - 0x77363000 C:\WINNT\system32\ADSLDPC.DLL
0x777F0000 - 0x777FE000 C:\WINNT\system32\RTUTILS.DLL
0x6D990000 - 0x6DA3C000 C:\WINNT\system32\SETUPAPI.DLL
0x794D0000 - 0x79532000 C:\WINNT\system32\USERENV.DLL
0x774A0000 - 0x774D3000 C:\WINNT\system32\RASAPI32.DLL
0x77480000 - 0x77491000 C:\WINNT\system32\RASMAN.DLL
0x774F0000 - 0x77512000 C:\WINNT\system32\TAPI32.DLL
0x77320000 - 0x77339000 C:\WINNT\system32\DHCPCSVC.DLL
0x777A0000 - 0x777A8000 C:\WINNT\System32\winrnr.dll
0x777B0000 - 0x777B5000 C:\WINNT\system32\rasadhlp.dll
0x74F50000 - 0x74F6E000 C:\WINNT\system32\msafd.dll
0x74F90000 - 0x74F97000 C:\WINNT\System32\wshtcpip.dll
0x13A60000 - 0x13A63000 C:\WINNT\mui\fallback\0804\msctf.dll.mui
0x6D2F0000 - 0x6D2F5000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\rmi.dll
0x72C50000 - 0x72CD6000 C:\WINNT\system32\CLBCATQ.DLL
0x77810000 - 0x7784E000 C:\WINNT\system32\cscui.dll
0x77080000 - 0x770A3000 C:\WINNT\system32\CSCDLL.DLL
0x76DB0000 - 0x76DC1000 C:\WINNT\system32\mydocs.dll
0x795B0000 - 0x796C2000 C:\WINNT\system32\SHDOCVW.DLL
0x76F60000 - 0x76F6F000 C:\WINNT\system32\ntshrui.dll
0x773A0000 - 0x773B5000 C:\WINNT\system32\ATL.DLL
0x750F0000 - 0x750FC000 C:\WINNT\System32\ntlanman.dll
0x751A0000 - 0x751B5000 C:\WINNT\System32\NETUI0.DLL
0x75160000 - 0x75198000 C:\WINNT\System32\NETUI1.DLL
0x6D130000 - 0x6D152000 E:\Program Files\JBuilder8\jdk1.4\jre\bin\dcpr.dll
0x76AF0000 - 0x76B2E000 C:\WINNT\system32\COMDLG32.DLL
0x6A900000 - 0x6A949000 C:\WINNT\system32\spool\DRIVERS\W32X86\3\CAP3UIK.DLL
0x15950000 - 0x1596C000 C:\WINNT\system32\spool\DRIVERS\W32X86\3\CAP3K.DLL
0x78050000 - 0x78072000 C:\WINNT\system32\spool\DRIVERS\W32X86\3\PS5UI.DLL
0x73D90000 - 0x73E03000 C:\WINNT\system32\spool\DRIVERS\W32X86\3\PSCRIPT5.DLL
0x6B020000 - 0x6B033000 C:\WINNT\system32\mscms.dll
0x50900000 - 0x5090E000 C:\WINNT\system32\spool\DRIVERS\W32X86\3\CAP3RDN.DLL
0x77900000 - 0x77923000 C:\WINNT\system32\imagehlp.dll
0x72960000 - 0x7298D000 C:\WINNT\system32\DBGHELP.dll
0x687E0000 - 0x687EB000 C:\WINNT\system32\PSAPI.DLL

Local Time = Mon May 24 13:27:16 2004
Elapsed Time = 75
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode)
#
# An error report file has been saved as hs_err_pid1552.log.
# Please refer to the file for further information.
#


How to solve it?
Thanks in advance.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!