Bug Report T1172431
Visible to All Users

ExportToPdf - Font Fallback - The StackOverFlow exception is thrown on exporting a report with certain symbols

created 2 years ago (modified 2 years ago)
Call Stack
System.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#
Show previous comments (10)

    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.

    Boris (DevExpress Support) 2 years ago

      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

        Answers approved by DevExpress Support

        created 2 years ago

        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.
          Show previous comments (7)

            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

            Yaroslav (DevExpress Support) a year ago

              @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.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.