MATLAB: Does MATLAB 7.0 (R14) crash when I try to print the contents of the Editor window on a Windows 2000 machine

crasheditorjavaMATLABprintprinterwindow

MATLAB 7.0 (R14) crashes when I try to print the contents of the Editor window on a Windows 2000 machine.
I am using the MATLAB Editor to view a file. When I try to print the file, MATLAB crashes. I get the following error log. A similar error also occurs when I try to print the contents of the Command Window.
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77FCCA36
Function=[Unknown.]
Library=C:\WINNT\system32\ntdll.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.print.Win32PrintService.getCapabilities(Native Method)
at sun.print.Win32PrintService.<init>(Unknown Source)
at sun.print.Win32PrintServiceLookup.getPrintServices(Unknown Source)
at sun.print.Win32PrintServiceLookup.getPrintServices(Unknown Source)
at javax.print.PrintServiceLookup.getServices(Unknown Source)
at javax.print.PrintServiceLookup.lookupPrintServices(Unknown Source)
at com.mathworks.widgets.SyntaxTextPane.printDocument(SyntaxTextPane.java:2673)
at com.mathworks.mde.editor.EditorView.doPrint(EditorView.java:1185)
at com.mathworks.mde.editor.EditorView.access$1300(EditorView.java:41)
at com.mathworks.mde.editor.EditorView$5.update(EditorView.java:405)
at java.util.Observable.notifyObservers(Unknown Source)
at com.mathworks.mde.editor.GenericAction$RegisteredObservable. notifyRegisteredObservers(GenericAction.java:327)
at com.mathworks.mde.editor.GenericAction.actionPerformed(GenericAction.java:318)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing

Best Answer

The problem originates from having a registered printer with an incompatible driver. The incompatibility is between the printer driver and Java. If a printer driver for an additional registered printer is incorrect, users may not be able to print even if the default printer driver is correct. To work around this issue, do the following:
1. Make sure that all registered printers have up-to-date drivers. If this does not solve the problem, it should be possible to unregister the printers individually and determine which one is causing the failure. If you leave that printer unregistered, it should then be possible to print to a different printer.
2. Try deleting and then reinstalling all printers. This process may update all the drivers and solve the issue.
3. An alternate workaround would be to copy and paste into another text editor to print.