Error: A generic error occurred in GDI+.
Error: A generic error occurred in GDI+.
Hello,
When I try to preview of print a big report under windows 7 or windows 2008 I get the following error (after Report.Load(reportname));
Exception.Message:
A generic error occurred in GDI+.
There is no problem with windows 2003 or windows XP.
=============================
Exception.StackTrace:
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(MemoryStream stream)
at System.Drawing.ImageConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
at System.ComponentModel.TypeConverter.ConvertTo(Object value, Type destinationType)
at Stimulsoft.Base.Drawing.StiImageConverter.ImageToBytes(Image image)
at Stimulsoft.Base.Drawing.StiImageConverter.ImageToString(Image image)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.AddImage(String parent, String name, StiPropertyInfo prop)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.Serialize(StiReport report, String name, StiLanguage language, Boolean serializeData, Boolean saveForInheritedReports, Object standaloneReportType)
at Stimulsoft.Report.StiReport.ScriptUnpack(Boolean saveForInheritedReports)
at Stimulsoft.Report.StiReport.ScriptUnpack()
at Stimulsoft.Report.SaveLoad.StiXmlReportSLService.Load(StiReport report, Stream stream)
at Stimulsoft.Report.StiReport.Load(StiReportSLService service, Stream stream)
at Stimulsoft.Report.StiReport.Load(Stream stream)
at Stimulsoft.Report.StiReport.Load(String path)
at StimulReport2010_01.StimulReport.GetCompiledVersion(String reportDllName, String reportFileName, StiReport& report, String& errmessage) in E:\Source\2005\Unifreight\StimulReport\StimulReport2010_01\StimulReport.cs:line 698
Thanks.
When I try to preview of print a big report under windows 7 or windows 2008 I get the following error (after Report.Load(reportname));
Exception.Message:
A generic error occurred in GDI+.
There is no problem with windows 2003 or windows XP.
=============================
Exception.StackTrace:
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(MemoryStream stream)
at System.Drawing.ImageConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
at System.ComponentModel.TypeConverter.ConvertTo(Object value, Type destinationType)
at Stimulsoft.Base.Drawing.StiImageConverter.ImageToBytes(Image image)
at Stimulsoft.Base.Drawing.StiImageConverter.ImageToString(Image image)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.AddImage(String parent, String name, StiPropertyInfo prop)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.SerializeProps(StiPropertyInfoCollection props, Boolean isList, String parentName, String referenceName)
at Stimulsoft.Report.CodeDom.StiCodeDomSerializator.Serialize(StiReport report, String name, StiLanguage language, Boolean serializeData, Boolean saveForInheritedReports, Object standaloneReportType)
at Stimulsoft.Report.StiReport.ScriptUnpack(Boolean saveForInheritedReports)
at Stimulsoft.Report.StiReport.ScriptUnpack()
at Stimulsoft.Report.SaveLoad.StiXmlReportSLService.Load(StiReport report, Stream stream)
at Stimulsoft.Report.StiReport.Load(StiReportSLService service, Stream stream)
at Stimulsoft.Report.StiReport.Load(Stream stream)
at Stimulsoft.Report.StiReport.Load(String path)
at StimulReport2010_01.StimulReport.GetCompiledVersion(String reportDllName, String reportFileName, StiReport& report, String& errmessage) in E:\Source\2005\Unifreight\StimulReport\StimulReport2010_01\StimulReport.cs:line 698
Thanks.
Error: A generic error occurred in GDI+.
Hello,
If we diagnose the issue in the correct way, the problem is already fixed.
Please check the latest prerelease build.
Thank you.
If we diagnose the issue in the correct way, the problem is already fixed.
Please check the latest prerelease build.
Thank you.
Error: A generic error occurred in GDI+.
Thanks !!!
The problem has been fixed with new version 2011.1
The problem has been fixed with new version 2011.1
Error: A generic error occurred in GDI+.
Hello,
Thank you for letting us know about this!
Thank you for letting us know about this!
Re: Error: A generic error occurred in GDI+.
Hello,
the same problem still exists on another place:
System.ApplicationException: A generic error occurred in GDI+. --->
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Bitmap.GetHbitmap(Color background)
at System.Drawing.Bitmap.GetHbitmap()
at Stimulsoft.Report.Wpf.StiImageHelper.GetImageSource(Image image)
at Stimulsoft.Report.Painters.StiViewWpfPainter.PaintImage(StiView
view, DrawingContext dc, Rect rect)
at Stimulsoft.Report.Painters.StiViewWpfPainter.Paint(StiComponent
component, StiPaintEventArgs e)
at
Stimulsoft.Report.Painters.StiImageWpfPainter.Paint(StiComponent
component, StiPaintEventArgs e)
at Stimulsoft.Report.Components.StiComponent.Paint(StiPaintEventArgs e)
at
Stimulsoft.Report.Painters.StiContainerWpfPainter.PaintComponents(StiContainer
container, StiPaintEventArgs e)
at Stimulsoft.Report.Painters.StiPageWpfPainter.Paint(StiComponent
comp, StiPaintEventArgs e)
at Stimulsoft.Report.Components.StiComponent.Paint(StiPaintEventArgs e)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.CreatePageVisual(StiPage
page)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.RefreshPageVisual(StiPageVisual
pageVisual, StiPage page)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.RenderPageContent(StiPageVisual
pageVisual)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.UpdatePagesPlacement(Boolean
allowAnimation, Double baseOpacity)
at Stimulsoft.Report.Viewer.StiWpfViewerControl.AssignNewReport()
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.SetNewReport(StiReport
oldReport, StiReport value)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.OnReportChanged(Object
sender, DependencyPropertyChangedEventArgs e)
....
the same problem still exists on another place:
System.ApplicationException: A generic error occurred in GDI+. --->
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Bitmap.GetHbitmap(Color background)
at System.Drawing.Bitmap.GetHbitmap()
at Stimulsoft.Report.Wpf.StiImageHelper.GetImageSource(Image image)
at Stimulsoft.Report.Painters.StiViewWpfPainter.PaintImage(StiView
view, DrawingContext dc, Rect rect)
at Stimulsoft.Report.Painters.StiViewWpfPainter.Paint(StiComponent
component, StiPaintEventArgs e)
at
Stimulsoft.Report.Painters.StiImageWpfPainter.Paint(StiComponent
component, StiPaintEventArgs e)
at Stimulsoft.Report.Components.StiComponent.Paint(StiPaintEventArgs e)
at
Stimulsoft.Report.Painters.StiContainerWpfPainter.PaintComponents(StiContainer
container, StiPaintEventArgs e)
at Stimulsoft.Report.Painters.StiPageWpfPainter.Paint(StiComponent
comp, StiPaintEventArgs e)
at Stimulsoft.Report.Components.StiComponent.Paint(StiPaintEventArgs e)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.CreatePageVisual(StiPage
page)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.RefreshPageVisual(StiPageVisual
pageVisual, StiPage page)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.RenderPageContent(StiPageVisual
pageVisual)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.UpdatePagesPlacement(Boolean
allowAnimation, Double baseOpacity)
at Stimulsoft.Report.Viewer.StiWpfViewerControl.AssignNewReport()
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.SetNewReport(StiReport
oldReport, StiReport value)
at
Stimulsoft.Report.Viewer.StiWpfViewerControl.OnReportChanged(Object
sender, DependencyPropertyChangedEventArgs e)
....
Re: Error: A generic error occurred in GDI+.
Hello Lukas,
Typically this problem occurs when something wrong with the image. In some cases GDI can't correctly load some parts of image and it can generate this error in some drawing mode.
Please try to re-save image. Some times it helps. Also please send to use mdc file for this report. Usually mdc file helps to easy detect similar problems with painting.
Thank you.
Typically this problem occurs when something wrong with the image. In some cases GDI can't correctly load some parts of image and it can generate this error in some drawing mode.
Please try to re-save image. Some times it helps. Also please send to use mdc file for this report. Usually mdc file helps to easy detect similar problems with painting.
Thank you.
Re: Error: A generic error occurred in GDI+.
Hi!
I'm using Stimulsoft.Net 2011.1.1000 and I have the same problem. I'm trying to produce report with client signatures. One page with one signature. After rendering, this report should be saved in PDF or Excel format. When amount of pages exceeds some value (approx. 800-900) my app crashes with exception:
for PDF format -
In order to test this problem, I updated all signatures in test DB to the same value. When my app generates report with 300-400 pages with the same signature, everything is OK. But when I'm trying to build report with 1000 pages, it crashes. So, it couln't be problem with image.
Please, give me any advise about this problem.
I'm using Stimulsoft.Net 2011.1.1000 and I have the same problem. I'm trying to produce report with client signatures. One page with one signature. After rendering, this report should be saved in PDF or Excel format. When amount of pages exceeds some value (approx. 800-900) my app crashes with exception:
for PDF format -
for Excel format -Application Error
An error occurred please contact the adminstrator with the following information:
A generic error occurred in GDI+.
Stack Trace:
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
at Stimulsoft.Report.Viewer.StiPageViewControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.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)
This exceptions was produced for the same data.System.OutOfMemoryException
In order to test this problem, I updated all signatures in test DB to the same value. When my app generates report with 300-400 pages with the same signature, everything is OK. But when I'm trying to build report with 1000 pages, it crashes. So, it couln't be problem with image.
Please, give me any advise about this problem.
Re: Error: A generic error occurred in GDI+.
Some addtitional info about my report:
- signatures stored in DB in Base64 format
- to display signature, I'm using Image control in data band.
- for Image control specified this formule:
- data band is freeform (not grid)
- for each row I'm using new page of report
Report is building from C# project. Some code:
Specified exception for PDF format is shown when user typed path to save report (SaveAs)
PS: sorry for my bad english
- signatures stored in DB in Base64 format
- to display signature, I'm using Image control in data band.
- for Image control specified this formule:
Code: Select all
{StiImageHelper.GetImageFromObject(System.Convert.FromBase64String(sq_TicketSingle.Signature))}
- for each row I'm using new page of report
Report is building from C# project. Some code:
Code: Select all
...
StiReport reportCtrl = new StiReport();
reportCtrl.Load(_ReportTemplate);
//Set Database connection params
reportCtrl.Dictionary.Databases.Clear();
reportCtrl.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Connection", (ConfigurationManager.AppSettings["connectionString"]).Replace("Provider=SQLOLEDB;", string.Empty)));
//Set values for report variables
BindReportVariables(reportCtrl, reportParms);
foreach (StiSqlSource s in reportCtrl.Dictionary.DataSources)
if (s.CommandTimeout <= 30)
s.CommandTimeout = 300;
reportCtrl.Render();
if (!String.IsNullOrEmpty(SaveAs))
{
switch (SaveAsFormat)
{
case FileFormats.FORMATS.HTML:
reportCtrl.ExportDocument(StiExportFormat.Html, SaveAs);
break;
case FileFormats.FORMATS.TEXT:
reportCtrl.ExportDocument(StiExportFormat.Text, SaveAs);
break;
case FileFormats.FORMATS.PDF:
reportCtrl.ExportDocument(StiExportFormat.Pdf, SaveAs);
break;
case FileFormats.FORMATS.WORD:
reportCtrl.ExportDocument(StiExportFormat.Word2007, SaveAs);
break;
case FileFormats.FORMATS.EXCEL:
reportCtrl.ExportDocument(StiExportFormat.Excel, SaveAs);
break;
default:
throw new Exception("File Format not supported");
}
}
if (!isSilent)
reportCtrl.Show();
PS: sorry for my bad english
Re: Error: A generic error occurred in GDI+.
Hello.
You have different error.
Please, try to upgrade to the latest build.
If the error still occurs, please, send us a sample report template with data.
Thank you.
You have different error.
Please, try to upgrade to the latest build.
If the error still occurs, please, send us a sample report template with data.
Thank you.
Re: Error: A generic error occurred in GDI+.
Yes, I see that errors are different. But they are for different file formats, as You see.Aleksey Andreyanov wrote:Hello.
You have different error.
Please, try to upgrade to the latest build.
If the error still occurs, please, send us a sample report template with data.
Thank you.
How can I uprade my Stimulsoft version? I've got licensed version of software as distibutive, that was download from your server 2-3 years ago. As my colleagues mentioned to me, they had login/password for that server with updates, but that password is expired.