Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Feb 26, 2019 11:25 pm

page.ExtractText() throws the following exception:

"Object reference not set to an instance of an object."
" at spr?..ctor(spr\u171e A_0)\r\n at spr?.?(spr\u171e A_0, spr\u1719 A_1)\r\n at spr?..ctor(String A_0, spr\u171e A_1, spr? A_2)\r\n at spr?.?()\r\n at spr?..ctor(PdfPageBase A_0, spr\u171e A_1)\r\n at Spire.Pdf.PdfPageBase.?(String[] A_0, Boolean A_1, spr? A_2)\r\n at Spire.Pdf.PdfPageBase.?(spr? A_0, spr? A_1, Boolean A_2)\r\n at Spire.Pdf.PdfPageBase.ExtractText(Boolean keepWhiteSpace)\r\n at Spire.Pdf.PdfPageBase.ExtractText()

Jan.vanSoelen
 
Posts: 29
Joined: Wed Nov 01, 2017 4:22 pm

Wed Feb 27, 2019 2:09 am

Hello Jan,

Thanks for your post.
To help us look into your issue accurately, please provide your testing documents. You could send them to us via email ([email protected]). And don't worry, we promise to keep your resources confidential and won't use them for other purpose. You could remove the confidential data from your document, just make sure the modified file can reproduce your issues. Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Wed Feb 27, 2019 3:04 am

Again, we are not allowed to share the documents.
Please fix your code.

Jan.vanSoelen
 
Posts: 29
Joined: Wed Nov 01, 2017 4:22 pm

Wed Feb 27, 2019 6:05 am

Hello Jan,

Thanks for your quick response.
Firstly, I suggest you download our latest version Spire.PDF Pack(Hot Fix) Version:5.2.3 to try again. If the issue still occurs, I am afraid it is impossible to investigate and fix your issues without your testing documents. Since different documents have different structures, they may cause different results. Thanks for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Wed Feb 27, 2019 2:04 pm

Hi Lisa,
Documents could have different structures.
Your code however not. And in plain sight your code has a bug.
Somewhere there is a null pointer exception. This is a programming error, nothing else.
This was also the case with the exception i reported earlier this year - Index out of bounds.
And the other 2 exceptions, yesterday.
Which shows this is unreliable code. A good programmer will find these issues without debugging, not needing the help of the underlying document.
If you cannot fix these issues, then I need to move on to another software vendor.

Jan.vanSoelen
 
Posts: 29
Joined: Wed Nov 01, 2017 4:22 pm

Thu Feb 28, 2019 2:35 am

Dear Jan,

Thanks for your feedback.
We did some tests with the latest Spire.PDF Version:5.2.3, but didn't encounter these issues as yours. Different PDF documents have different structures and elements. Maybe your PDF documents contain special elements or structures which cause your issues. But our testing library does not have documents with the same structures yet, so we haven't reproduced your issues. We are so sorry for the inconvenience caused. We need your documents to locate the root of your issues quickly and accurately and accordingly change our code to fix these issues. You could send them to email ([email protected]). Thanks for your cooperation.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Thu Feb 28, 2019 4:46 am

Hi Lisa,
Please understand we're not allowed to share the documents.
How about I'll give you the stack trace of the 2 exceptions.
The stack overflow exception occurs from too many recursive calls.
Please have a good programmer look at the code, and he'll find it.
Please let me know if this is a doable approach. If not we need to look else where.

Cheers
Jan

Jan.vanSoelen
 
Posts: 29
Joined: Wed Nov 01, 2017 4:22 pm

Thu Feb 28, 2019 7:27 am

Dear Jan,

Thanks for your quick responce.
Please firstly share us with the stack traces of your exceptions and the type information of your application (such as .NET Framework 4.5), our Dev team will do a further investigation to see if they can locate the specific reason for your issues. If not, we will also need your input documents, you could remove the confidential data just make sure the modified file could reproduce your issues. Hope you can understand. Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Thu Feb 28, 2019 2:34 pm

Hi Lisa,
Thank you for your response.
Please note this posting is for all 3 exceptions posted on the forum,
The application is a .Net 4.6.1 WPF application.
Also please note a stack overflow occurs when recurrence is out of control.
Not a complete stack trace is available because the application is removed by the windows operating system.
The application code runs until the foreach statement...
PdfDocument doc = new PdfDocument(bytes);

foreach (PdfPageBase page in doc.Pages)


And also please see below the 3 exceptions with stack trace as reported on the forum.

Hopefully this helps your team with resolving the bugs.
Cheers
Jan

"Object reference not set to an instance of an object."
" at spr?..ctor(spr\u171e A_0)\r\n at spr?.?(spr\u171e A_0, spr\u1719 A_1)\r\n at spr?..ctor(String A_0, spr\u171e A_1, spr? A_2)\r\n at spr?.?()\r\n at spr?..ctor(PdfPageBase A_0, spr\u171e A_1)\r\n at Spire.Pdf.PdfPageBase.?(String[] A_0, Boolean A_1, spr? A_2)\r\n at Spire.Pdf.PdfPageBase.?(spr? A_0, spr? A_1, Boolean A_2)\r\n at Spire.Pdf.PdfPageBase.ExtractText(Boolean keepWhiteSpace)\r\n at Spire.Pdf.PdfPageBase.ExtractText()\r\n at WpfApp1.PDF.Transform(Byte[] bytes, StringBuilder sb) in C:\\Users\\Jan\\source\\repos\\WpfApp1\\WpfApp1\\PDF.cs:line 94"

"No FunctionType specified in function!"
" at spr?.?(spr\u171e A_0)\r\n at spr?.?()\r\n at spr\u1879.?(String A_0)\r\n at spr\u1879.?(String[] A_0, String A_1, spr? A_2)\r\n at spr\u1879.?(Boolean A_0, Boolean A_1, List`1& A_2, Boolean A_3)\r\n at spr?.?(Boolean A_0, Boolean A_1, List`1& A_2)\r\n at spr?.?(Boolean A_0, List`1& A_1)\r\n eat Spire.Pdf.PdfPageBase.?(Boolean A_0, List`1& A_1)\r\n at Spire.Pdf.PdfPageBase.ExtractImages(Boolean processImage)\r\n at Spire.Pdf.PdfPageBase.ExtractImages()\r\n at WpfApp1.PDF.Transform(Byte[] bytes, StringBuilder sb) in C:\\Users\\Jan\\source\\repos\\WpfApp1\\WpfApp1\\PDF.cs:line 96"

Process is terminated due to StackOverflowException.
An unhandled exception of type 'System.StackOverflowException' occurred in System.Drawing.dll

Jan.vanSoelen
 
Posts: 29
Joined: Wed Nov 01, 2017 4:22 pm

Fri Mar 01, 2019 2:37 am

Dear Jan,

Thanks for your details.
Our Dev team will do a further investigation based on these information. If there is any update, we will keep you informed.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Tue Mar 12, 2019 6:58 pm

Hi Lisa,
Do you have any status updates for the 3 issues reported?
Cheers
Jan

Jan.vanSoelen
 
Posts: 29
Joined: Wed Nov 01, 2017 4:22 pm

Wed Mar 13, 2019 3:22 am

Hello Jan,

Thank you for following up. Our Dev team have found the possible causes of your issues and fixed them, and they are pending test now. Once the tests pass, we will prepare a hotfix to check if it could work on your side.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Tue Mar 19, 2019 7:29 am

Hello Jan,

Thanks for your patient waiting.
We just released Spire.PDF 5.3.8, please download it from the following link to check if it could work for you. If your issues still occur after trying, then we must need your testing documents to do further investigations.
Our website link: Spire.PDF Pack(Hot Fix) Version:5.3.8.
NuGet link: https://www.nuget.org/packages/Spire.PDF/

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Tue Mar 19, 2019 3:01 pm

Hi Lisa,
Thank you for trying to get the code repaired.
I updated the nuget package for the new version and ran my test which resulted in the exact same exceptions as reported.
Please let me know if your team will be able to fix these exceptions.
Cheers
Jan

Jan.vanSoelen
 
Posts: 29
Joined: Wed Nov 01, 2017 4:22 pm

Wed Mar 20, 2019 1:48 am

Hello Jan,

I'm sorry to hear that. Our Dev team did some code repaired in this hotfix just based on our testing library documents. As mentioned earlier, maybe your PDF documents contain special elements or structures, our Dev team have no way to locate the root cause of your issues without your documents. Thus, I suggest you provide your testing documents to us, so that our Dev team could fix these exceptions accurately. Thanks for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF