Export to pdf throws NullReferenceException
stefan-thaler-compLex opened this issue · comments
We have already tried to get in touch and get a solution with creating a support ticket over the cpanel (Ticket #726912). Since about two months there is nearly no reaction and no information about a solution in the near future. We are really disappointed - hopefully this way will make things better to get a solution in the near future.
compLex (January 04, 2023):
We are facing a NullReferenceException during an export as pdf. We prepare the report without errors and after that we export it to pdf with the below error some times.
The frx file only uses the font arial (Font="Arial, 10pt, style=Bold" and Font="Arial, 10pt"; not only 10 pt, also different pt sizes). It is working on a machine with Windows 10 Version 22H2, Windows 10 Version 21H2, but not on a machine with Windows Server 2019 Version 1809 and also on one machine with Windows 10 Version 22H2 it is not working.
The project is published with target framework net6.0-windows and includes the .net 6.0 (self contained).
Stacktrace:
04.01.2023 19:09:56,376 (running since 9096 ms) - ERROR - [ 7] nb2integral_lib.Worker.Nb2integralBackgroundWorker (Nb2IntegralDoWork ) - Error in nb2integral
System.NullReferenceException: Object reference not set to an instance of an object.
at FastReport.Fonts.TrueTypeFont.get_Bold()
at FastReport.Fonts.TrueTypeFont.get_FastName()
at FastReport.Fonts.TrueTypeCollection.CompareHashes(Boolean delete, Boolean append)
at FastReport.Fonts.TrueTypeCollection.CheckFontList(String folder)
at FastReport.Fonts.TrueTypeCollection.GetTrueTypeFont(String key)
at FastReport.Export.TTF.ExportTTFFont.GetTrueTypeFont(Font source_font)
at FastReport.Export.TTF.ExportTTFFont.FillEmulate()
at FastReport.Export.Pdf.PDFExport.GetGlobalFont(Font font)
at FastReport.Export.Pdf.PDFExport.GetObjFontNumber(Font font)
at FastReport.Export.Pdf.PDFExport.AppendText(StringBuilder result, Font font, Single x, Single y, Single offsX, Single width, String text, Boolean rtl, Boolean transformNeeded, TextOutline objTextOutline, Color fontColor, Boolean bbox, Single bbox_height)
at FastReport.Export.Pdf.PDFExport.AddTextObjectInternal(TextObject obj, RectangleF textRect, Boolean transformNeeded, StringBuilder sb, Boolean bbox)
at FastReport.Export.Pdf.PDFExport.AddTextObject(TextObject obj, Boolean drawBorder, StringBuilder sb_in)
at FastReport.Export.Pdf.PDFExport.ExportObj(Base c)
at FastReport.Export.Pdf.PDFExport.ExportBand(BandBase band)
at FastReport.Export.ExportBase.ExportPageNew(Int32 pageNo)
at FastReport.Export.ExportBase.Export(Report report, Stream stream)
at nb2integral_fastReports.Service.FastReportService.CreateKto(AccountCreateResponseType createdAccount, NotaryData notaryData, String templateFileName) in C:\vs_workspace\nb2integral-v2-net6\nb2integral\nb2integral-fastReports\Service\FastReportService.cs:line 122
at nb2integral_lib.Services.KtoService.GetPdf(AccountCreateResponseType createResponseType, NotaryData notaryData, String templateFileName) in C:\vs_workspace\nb2integral-v2-net6\nb2integral\nb2integral-lib\Services\KtoService.cs:line 33
at nb2integral_lib.Worker.Nb2integralBackgroundWorker.Nb2IntegralDoWork() in C:\vs_workspace\nb2integral-v2-net6\nb2integral\nb2integral-lib\Worker\Nb2integralBackgroundWorker.cs:line 128
Furthermore we have already tried to load a custom font (Open Sans) as described here https://www.fast-report.com/en/blog/show/fonts-reports-without-installing/ but this is also not working.
Are there any known issues? How can we solve this problem?
Fast Report - German (January 05, 2023) - click for details
Hello! Thank you for contacting support.
Could you please attach a small test project on which we can reproduce the problem?
Best regards,
German
compLex (January 09, 2023) - click for details
Hello German, attached you can find a zip file with a small project, which is also causing the error as written above and shown in the screenshot attached. Currently I am facing this issue on three machines (Windows 10 21H2, Windows 10 22H2, Windows Server 2019 Build 1809). I have already tried to load the used fonts (see subfolder Font), which is Arial, manually (as shown here: https://www.fast-report.com/en/blog/show/fonts-reports-without-installing/) but without success. There has also been a test, if something changes, depending on the used fast report version, but also without success (2022.2.0, 2022.2.18, 2022.3.0, 2022.3.15, 2023.1.0, 2023.1.7). Thanks in advance and best regards, Stefan Thaler
Fast Report - German (January 09, 2023) - click for details
Hello!
We understand what the problem is and we are trying to fix it. We will let you know as soon as the details of the fix are available.
Best regards,
German
compLex (January 16, 2023) - click for details
Hello, can you tell us a planned date, when the fix should be published, because we have a big rollout next week. Thanks in advance, best regards, Stefan Thaler
Fast Report - German (January 17, 2023) - click for details
Hello!
This is a big problem and we understand it. Fixing this error will require a lot of time and resources. We cannot yet tell you even an approximate date for fixing it.
Best regards,
German
compLex (March 06, 2023) - click for details
Hello, nearly two months of waiting but no fix until now not even an information about the status. It's really frustrating because projects were postponed and customers are waiting. If there is no response and no date for a release of this bugfix until this friday (2023-03-10) we are checking for legal steps. Thanks in advance and best regards, Stefan Thaler
In parallel there are already legal steps checked, if the contract is maybe not fully fulfilled. We are hoping that further steps won't be necessary and there is a solution coming soon.
Dear @stefan-thaler-compLex . We apologize for letting you down with such poor communication. You have a more detailed reply in your inquiry in our support system. Right now, the issue is that we can’t reproduce the error and that our previous suspicions regarding its cause were incorrect.
We are sorry for not communicating the issue sooner. We are working to find the solution as soon as possible. Please check your support ticket.