Welcome Guest Search | Active Topics | Sign In | Register

System.NullReferenceException: Object reference not set to an instance of an object. Options
Tyler Miller
Posted: Monday, August 7, 2023 2:38:22 PM
Rank: Advanced Member
Groups: Member

Joined: 1/22/2014
Posts: 38
Getting this with the latest version 23.2.65 on the Merge method no other code changes just upgraded from version 22.x version all other functions seem good

System.NullReferenceException: Object reference not set to an instance of an object.

System.NullReferenceException: Object reference not set to an instance of an object.
at EO.Internal.lohe.kubg(lohp cuj, Int32 cuk)
at EO.Internal.lohe.kubd(lohp cuh)
at EO.Internal.lohe.cnhn(Stream cud, Boolean cue, Boolean cuf)
at EO.Internal.lohe..ctor(Stream ctq, PdfDocumentSecurity ctr, Boolean cts, Boolean ctt)
at EO.Pdf.PdfDocument.exhb(String afw)
at EO.Pdf.PdfDocument.Merge(String fileName1, String fileName2, Int32 bookmarkLevel)
at EO.Pdf.PdfDocument.Merge(String fileName1, String fileName2)
eo_support
Posted: Monday, August 7, 2023 4:03:24 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Please use the contact us page to send the two files in question to us and we will debug into it and see what we can find:

https://www.essentialobjects.com/contact

Thanks!
Tyler Miller
Posted: Monday, August 7, 2023 4:07:27 PM
Rank: Advanced Member
Groups: Member

Joined: 1/22/2014
Posts: 38
Unfortunately cannot share however these are generated files and until the upgrade no issues. Currently trying to rollback to the highest version without the issue.

Are we able to log more detail that will share insight for you that wouldn't involve sharing file contents?
eo_support
Posted: Monday, August 7, 2023 4:42:04 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
No. It's not possible for us to troubleshoot these kind of problem through logging. The fact that the code is failing is due to it is seeing something unexpected. It could be valid PDF construct that our code did not handle properly, or invalid PDF construct that our code could not gracefully handle. In either case the next logical step is we need to see exactly what that unexpected is. Once we know exactly what that unexpected is, we will change our code to cope with it accordingly. In order to do this we must have the PDF files in question.

Obviously we are not interested in the content of your file. We are simply interested in finding out why our code is failing with your PDF file. We will have no problem to sign NDA with you if needed.
Tyler Miller
Posted: Monday, August 7, 2023 4:46:56 PM
Rank: Advanced Member
Groups: Member

Joined: 1/22/2014
Posts: 38
Able to reproduce with test data sending via contact.
Tyler Miller
Posted: Monday, August 7, 2023 11:37:44 PM
Rank: Advanced Member
Groups: Member

Joined: 1/22/2014
Posts: 38
Btw I sent test data but I've confirmed this appears in 23.1.45 as a bug but not versions before.
eo_support
Posted: Tuesday, August 8, 2023 9:47:22 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We have received the test files and found the root of the problem. The issue will be fixed in our next build and we will reply here again when the new build is available.

Thanks!
eo_support
Posted: Wednesday, August 23, 2023 9:47:43 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

This is just to let you know that we have posted build 23.3.4 that should resolve this issue. Please take a look and let us know how it goes.

Thanks!
Tyler Miller
Posted: Wednesday, August 23, 2023 11:11:34 AM
Rank: Advanced Member
Groups: Member

Joined: 1/22/2014
Posts: 38
Thanks I tested it and it doesn't fail on the merge, but I now have a new error same document you have you can reproduce:

using (HtmlToPdfSession session = HtmlToPdfSession.Create())
{
session.LoadHtml(CreateHtmlStyleSheet(stylesheetpath) + htmlContent);

Paginator paginator = session.CreatePaginator();

EO.Pdf.HtmlToPdfException: 'Conversion failed.'

The Paginator paginator = session.CreatePaginator(); does this:

NullReferenceException: Object reference not set to an instance of an object.

This exception was originally thrown at this call stack:
[External Code]

This never failed before.
eo_support
Posted: Wednesday, August 23, 2023 12:29:45 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Thanks for letting us know and sorry about the problem. We have updated the download page to build 23.3.5. Please let us know if the new build resolve this issue for you.
Tyler Miller
Posted: Thursday, August 24, 2023 11:22:06 PM
Rank: Advanced Member
Groups: Member

Joined: 1/22/2014
Posts: 38
Thanks this version passes testing.
eo_support
Posted: Friday, August 25, 2023 9:32:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Great. Thanks for confirming!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.