Call StackSystem.StackOverflowException [Managed to Native Transition] mscorlib.dll!System.Runtime.InteropServices.Marshal.AllocCoTaskMem(int cb) Unknown DevExpress.Data.v23.1.dll!DevExpress.DirectX.NativeInterop.CCW.ComCallableWrapperBase.ComCallableWrapperBase() Line 67 C# DevExpress.Drawing.v23.1.dll!DevExpress.Drawing.Internal.Fonts.DirectWrite.DirectWriteAnalysisSource.DirectWriteAnalysisSource(string text, int offset, int length, bool rtlParagraph) Line 55 C# DevExpress.Drawing.v23.1.dll!DevExpress.Drawing.Internal.Fonts.DirectWrite.DirectWriteFontEngine.GetFallbackFont(DevExpress.Drawing.Internal.Fonts.StringView str, DevExpress.Drawing.Internal.Fonts.DXFontDescriptor sourceFont) Line 116 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfGDIExportFontEngine.GetFallbackFont(DevExpress.Drawing.Internal.Fonts.StringView str, DevExpress.Drawing.Internal.Fonts.DXFontDescriptor descriptor) Line 69 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfExportFontManager.GetFallbackFont(DevExpress.Drawing.Internal.Fonts.StringView str, DevExpress.Drawing.Internal.Fonts.DXFontDescriptor descriptor) Line 99 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfExportFullTrustFont.FullTrustFontShaper.ShapeText(string text, bool directionRightToLeft, float fontSizeInPoints, bool useKerning) Line 218 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfExportFullTrustFont.FullTrustFontShaper.ShapeText(string text, bool directionRightToLeft, float fontSizeInPoints, bool useKerning) Line 225 C# [The 1 frame(s) above this were repeated 5128 times] DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfExportFullTrustFont.FullTrustFontShaper.ShapeText(string text, bool directionRightToLeft, float fontSizeInPoints, bool useKerning) Line 225 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfLineFormatterFont.ShapeText(string text, bool directionRightToLeft, bool useKerning) Line 58 C# DevExpress.Drawing.v23.1.dll!DevExpress.Drawing.Internal.Fonts.DXLineFormatter.FormatText(string text, System.Drawing.SizeF? layoutSize, DevExpress.Drawing.Internal.Fonts.IDXLineFormatterFont font, DevExpress.Drawing.DXStringFormat stringFormat, DevExpress.Drawing.Internal.Fonts.DXKerningMode kerningMode, DevExpress.Drawing.Internal.Fonts.DXLineFormatter.IResultBuilder resultBuilder) Line 154 C# DevExpress.Drawing.v23.1.dll!DevExpress.Drawing.Internal.Fonts.DXLineFormatter.FormatLines(string text, System.Drawing.SizeF? layoutSize, DevExpress.Drawing.Internal.Fonts.IDXLineFormatterFont font, DevExpress.Drawing.DXStringFormat stringFormat, DevExpress.Drawing.Internal.Fonts.DXLineFormatterOptions options) Line 116 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfSignatureAppearanceBuilder.DrawString(DevExpress.Pdf.Native.PdfCommandConstructor constructor, string text, DevExpress.Pdf.ContentGeneration.PdfExportFontInfo fontInfo, DevExpress.Pdf.PdfRectangle textRectangle, DevExpress.Drawing.DXStringFormat format) Line 138 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfSignatureAppearanceBuilder.DrawText(string text, DevExpress.Pdf.PdfSignatureFontSettings fontSettings, DevExpress.Pdf.Native.PdfFormCommandConstructor constructor, DevExpress.Pdf.PdfRectangle contentRectangle) Line 118 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfSignatureAppearanceBuilder.DrawContent(DevExpress.Pdf.Native.PdfFormCommandConstructor constructor, DevExpress.Pdf.PdfRectangle textRectangle, DevExpress.Pdf.PdfRectangle infoRectangle) Line 93 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfSignatureAppearanceBuilder.DrawFormContent(DevExpress.Pdf.Native.PdfFormCommandConstructor formConstructor) Line 192 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.ContentGeneration.PdfSignatureAppearanceBuilderBase.CreateAppearance(DevExpress.Pdf.PdfForm appearanceForm) Line 50 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.Native.PdfSignatureFieldDescription.CreateAppearance(DevExpress.Pdf.PdfForm appearanceForm, DevExpress.Pdf.PdfTransformationMatrix matrix) Line 116 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.Native.PdfSignatureFieldDescription.CreateAppearance(DevExpress.Pdf.Native.DocumentSigning.PdfDocumentCatalogObject catalog, DevExpress.Pdf.Native.DocumentSigning.PdfWidgetAnnotationObject widget) Line 105 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.Native.PdfSignatureFieldDescription.CreateAppearance(DevExpress.Pdf.Native.DocumentSigning.PdfDocumentCatalogObject catalog, DevExpress.Pdf.Native.DocumentSigning.PdfInteractiveFormFieldObject formField) Line 81 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.Native.PdfExistingSignatureDescription.ApplySignature(DevExpress.Pdf.Native.DocumentSigning.PdfDocumentCatalogObject catalog, DevExpress.Pdf.Native.DocumentSigning.PdfSignatureModelObject signatureModel) Line 129 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.Native.DocumentSigning.PdfDocumentCatalogObject.ApplySignature(DevExpress.Pdf.PdfSignatureBuilder signature) Line 73 C# DevExpress.Pdf.v23.1.Core.dll!DevExpress.Pdf.Native.DocumentSigning.PdfDocumentObject.SaveDocument(System.IO.Stream stream, bool failOnInvalidDocument, DevExpress.Pdf.PdfSignatureBuilder signatureBuilder) Line 51 C# DevExpress.Docs.v23.1.dll!DevExpress.Pdf.PdfDocumentSigner.SaveDocument(System.IO.Stream stream, DevExpress.Pdf.PdfSignatureBuilder[] signatures) Line 152 C#
ExportToPdf - Font Fallback - The StackOverFlow exception is thrown on exporting a report with certain symbols
Answers approved by DevExpress Support
We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.
Important Notes:
- Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
- .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
- v23.2.3Download Official Update
- v23.1.4Download Official Update
Hi,
is there any workaround for the problem?
Is there maybe a font or an option which does not lead to a crash?
Regards
Dominik
@Dominik,
This issue is fixed. Did you try to upgrade your application to v23.1.4
or higher? There's no suitable workaround we can offer here as this issue occurs whenever the text in use contains a glyph not present in the assigned font.
Yes, upgrade to v23.1.4 or higher fixes the problem but not all of our customers are able to update our application immediately.
I run into the same issue. Any news, updates or workarounds about that?
Hello,
We don't have results on this yet. Of course, I have already informed my team that this issue affected several different users, and we have raised the priority of this task.
Best regards,
Boris
Thanks, for us, we can't use V23 with this issue, it's too risky.
I don't know if it is relevant but our reports that is not working are using segoe UI font.
And I have just one report using Times New Roman and it is working export to PDF
We have tested with Calibri and works too, however with Arial does not works. So this issue affects specific fonts like Segoe UI, Arial…
Regards
Fernando
Hi Grinwald and Fernando,
Thank you for the replies. I shared this information with my R&D team. We will continue our research and let you know once we have results.
Best regards,
Boris
Boris,
One more relevant information to discover why it is happening:
At one report, even after change font to Calibri and all reports are working again (with Segoe UI 100% of reports are having this bug at PDF export) we realized 1 single case that was still not working even with Calibri font.
This report, an invoice, has a information about a PO Number (a property of business object). We change its content removing : of string as audit log and now works an export PDF with Calibri. This caracter ( : ), in this case, was causing the exception.
Let me know if I was clear.
Regards
Fernando
Any news? We were able so solve some problems by using the Calibri font instead of Arial, but there are still sporadic stackoverflows on some reports!
@Tobias,
The issue is a high priority, and our team is working on it right now. I'm expecting a fix to be available very soon. Please track this ticket for further updates.
We have the same problem, a report with old devexpress version work fine, but win 23.1 version generate "System.StackOverflowException" error
@Giovanni,
Thank you for informing us that your application is also impacted. If possible, please share a PRNX document produced by the affected report layout: Save and Open Report Documents. You can attach it here or create a new private ticket.
XtraReport report = new XtraReport(); report.LoadLayoutFromXml("layout.repx"); report.DataSource = ...; //if required report.CreateDocument(false); report.PrintingSystem.SaveDocument("document.prnx");
We have the same issue and in some instances for some users, the application is closing with no error message. So a fix ASAP would be appreciated please.
Hi Darren,
Thank you for the reply. We are already in the process of testing a potential fix.
Best regards,
Boris
I attached requested file.
In this case error in ExportToPdf is caused by char #1F included in datasource.
The same error happens when there is tabulation char or #01 or other strange chars.
In previous version it was not be a problem with that kind of chars.
Regards
Leszek