Posted 8 years ago by Jason Tobiasz
Version: 4.0.0250
Platform: Universal Windows Controls
Environment: Windows 7 (64-bit)
Avatar
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


StackTrace:
at
System.Drawing.Printing.StandardPrintController.OnStartPrint(PrintDocument
document, PrintEventArgs e)
at
System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint(PrintDocument
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 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 8 years ago by Jason Tobiasz
Avatar
Yeah, I've already wrapped the code in try/catch blocks. Well, thanks anyways.
The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.