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. Image for the cookie policy date

"NullReferenceException" in "Syncfusion.Pdf.Base"

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

3 Replies

AS Abirami Selvan Syncfusion Team 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.   



TE Testname May 19, 2016 07:32 AM UTC

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


AS Abirami Selvan Syncfusion Team 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.   


Loader.
Up arrow icon