Re: generic error in GDI+ occurs when drawing windows metafile



Maybe too many open handles? (for windows)

Are the print jobs the same length?

Best Regards,
Alejandro Lapeyre

"Patrick Gannon" <Patrick Gannon@xxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el
mensaje news:978CC263-C5D7-41C1-B330-FA0279A26C60@xxxxxxxxxxxxxxxx
>I am getting a sporadic external exception when drawing a windows metafile.
> The odd part about this is that the problem only occurs about one out a
> thousand times this code executes, and its the same metafiles that are
> always
> used (so it doesn't appear to be a problem with the metafile itself.) The
> code is as follows:
>
> private void PrintLogo(Graphics graphics)
> {
> //graphics.PageUnit = GraphicsUnit.Display;
> ResetTransform( graphics, true );
> using(Metafile logo = new Metafile(_printer.LogoImagePath))
> {
> graphics.DrawImage(logo, 0, 0, LOGO_WIDTH, LOGO_HEIGHT);
> }
> if(_printer.Report.Type.DrawLogoSeparator)
> {
> graphics.DrawLine(new Pen(new SolidBrush(Color.Black), 1.0F), 0,
> LOGO_HEIGHT, graphics.VisibleClipBounds.Width, LOGO_HEIGHT);
> graphics.DrawLine(new Pen(new SolidBrush(Color.Black), 1.0F), 0,
> LOGO_HEIGHT + 2, graphics.VisibleClipBounds.Width, LOGO_HEIGHT + 2.0F);
> }
> }
>
>
>
> The exception is as follows:
>
> Event Type: Error
> Event Source: Traffic Print Service
> Event Category: None
> Event ID: 0
> Date: 5/23/2005
> Time: 4:29:21 PM
> User: N/A
> Computer: {omitted}
> Description:
>
> General Information
> *********************************************
> Additional Info:
> ExceptionManager.MachineName: {omitted}
> ExceptionManager.TimeStamp: 5/23/2005 4:29:21 PM
> ExceptionManager.FullName:
> Microsoft.ApplicationBlocks.ExceptionManagement,
> Version=1.0.1357.24421, Culture=neutral, PublicKeyToken=null
> ExceptionManager.AppDomainName: {omitted}.traffic.output.service.exe
> ExceptionManager.ThreadIdentity: {omitted}
> ExceptionManager.WindowsIdentity: {omitted}
>
> 1) Exception Information
> *********************************************
> Exception Type: System.Runtime.InteropServices.ExternalException
> ErrorCode: -2147467259
> Message: A generic error occurred in GDI+.
> TargetSite: Void CheckErrorStatus(Int32)
> HelpLink: NULL
> Source: System.Drawing
>
> StackTrace Information
> *********************************************
> at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
> at System.Drawing.Graphics.DrawImage(Image image, Single x, Single y,
> Single width, Single height)
> at
> {omitted}.Traffic.Output.TrafficReportPrintDocument.PrintLogo(Graphics
> graphics)
> at
> {omitted}.Traffic.Output.TrafficReportPrintDocument.OnPrintPage(PrintPageEventArgs
> e)
> at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs
> e)
> at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument
> document)
> at System.Drawing.Printing.PrintController.Print(PrintDocument document)
> at System.Drawing.Printing.PrintDocument.Print()
> at {omitted}.Traffic.Output.ReportPrinter.Print(Boolean preview)
> at {omitted}.Traffic.Output.Spooler.Print(PrintRequest request)
> at {omitted}.Traffic.Output.Spooler.PrintLoop()
>
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
>
> Thanks in advance for any help you can provide!
> Patrick Gannon


.



Relevant Pages

  • Re: [announcement] SYSAPI and SYSSVC for Windows
    ... What do you need Windows NT for in this application? ... You can use SEH (Structured Exception Handling) to prevent a process from ... > Ada did solve this, ... If you implement your own message queues on Windows, use an Event object ...
    (comp.lang.ada)
  • Re: Blue screen crashes
    ... A kernel mode program generated an exception which the error handler ... What is your Windows XP CD as it is described on the face of the CD? ... What Warning and Error Reports appear in Event Viewer since it's ... If you have had a malware infestation one holds the door open to let ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: generic error in GDI+ occurs when drawing windows metafile
    ... The print jobs are not the same length. ... print request results in an "operation completed" exception, ... >>I am getting a sporadic external exception when drawing a windows metafile. ... >> private void PrintLogo(Graphics graphics) ...
    (microsoft.public.dotnet.framework)
  • Re: generic error in GDI+ occurs when drawing windows metafile
    ... The print jobs are not the same length. ... print request results in an "operation completed" exception, ... >>I am getting a sporadic external exception when drawing a windows metafile. ... >> private void PrintLogo(Graphics graphics) ...
    (microsoft.public.dotnet.framework)
  • Re: Sharepoint 2007 - Installation Error - Failed to register SP s
    ... Windows 2000 Server. ... It is a bug with Beta 2 where the database server is running Windows 2000. ... Server I have the following exception: ... RunBehavior runBehavior, String resetOptionsString) ...
    (microsoft.public.sharepoint.portalserver)

Loading