Posted 14 years ago by Jason Tobiasz
Version: 4.0.0250
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
A user attempted to print a document when the printer was unavailable. They clicked on a "print" button within our application, the printer selection screen came up. Then the user selected a printer that was unavailable (say it was powered down). And finally, they clicked 'Ok' to print and the crash occurred.

Here's the stack trace:

Source: System.Drawing
TargetSite: System.Drawing
Exception stack:
The RPC server is unavailable

document, PrintEventArgs e)
document, PrintEventArgs e)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at ActiproSoftware.SyntaxEditor.SyntaxEditor.Print(Boolean showDialog)
at al7.a(Object A_0, EventArgs A_1)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at z0.OnClick(EventArgs e)
at z0.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button,
Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Jason,

You should wrap the call to SyntaxEditor's Print method with a try...catch. We don't want to add try...catches within our code as then problems could be happening but you'd never know about them or be able to display a related dialog.

Actipro Software Support

Posted 14 years ago by Jason Tobiasz
Yeah, I've already wrapped the code in try/catch blocks. Well, thanks anyways.
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.