We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

"NullReferenceException" in "Syncfusion.Pdf.Base"

Thread ID:

Created:

Updated:

Platform:

Replies:

124113 May 18,2016 06:10 AM UTC May 20,2016 05:21 AM UTC ASP.NET MVC 3
loading
Tags: PDF
Testname
Asked On May 18, 2016 06:10 AM UTC

What I did:

Sometimes the error happens and sometimes not, but if I generate 5 PDF's in a row it will throw an exception(but not always...),once.

First I took a word file(e.g. my attachment, actually every word file I try to convert to pdf) worked with,saved it to ether a physically file or a MemoryStream.
Then I use the generated result(byte[]) from my Word file to generate my PDF-file.


This is the code, where the error comes in:

using (MemoryStream ms = new MemoryStream(_tempDatei))
{
WordDocument wordDocument = new WordDocument(ms);

DocToPDFConverter converter = new DocToPDFConverter();

pdfDocumentument pdfDocument = converter.ConvertToPDF(wordDocument);

//pdfDocument.Save(tempWordPdfFile); //Error occurs here
pdfDocument.Save(_temporaryMemoryStream); //and here
_tempDatei = _temporaryMemoryStream.ToArray();

wordDocument.Close();
converter.Dispose();
pdfDocument.Close();
}

The error:
"System.NullReferenceException"

occurs here, when I go into the save method:

pdfDocument.Save(tempWordPdfFile); //Error occurs here
and/or here (depending what I commented in)
pdfDocument.Save(_temporaryMemoryStream); //and here

Stacktrace and watch:
http://s32.postimg.org/5f8a0c0zn/syncfusion_stacktrace.png

I cant not provide you the code, because it is a big project.

How can I solve that problem ?


Attachment: SIS_b3e6a6f5.7z

Abirami Selvan [Syncfusion]
Replied On May 19, 2016 06:39 AM UTC

Hi Customer, 
Thank you for contacting Syncfusion support. 
We are able to reproduce the issue “Getting null reference exception when convert Doc to PDF with multithreading”. We have logged this issue in our database. This issue will be fixed in our upcoming volume 2, 2016  release. We request you to check our website for release updates. 
Regards, 
Abirami.   


Testname
Replied On May 19, 2016 07:32 AM UTC

When will fix this, until June or August ... ?

Abirami Selvan [Syncfusion]
Replied On May 20, 2016 05:21 AM UTC

Hi Customer, 
The fix will be available in our upcoming volume 2 release which is expected to be rolled out by mid of June 2016. 
Regards, 
Abirami.   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;