Free Support Forum - groupdocs.com

Previewing issue occurring sometimes

Hi

One of our test cases has come up with the following issue when previewing PDFs. I can't give steps on how to reproduce this issue however the following is the error on client side and the stack trace from the previewing .NET service. The stack trace seems to be pointing to your code so I was wondering if you could determine what the issue is from the stack?

http://screencast.com/t/hsP2YsTzo

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

“.“.‚(Operator ):54

“.“.Parse():1004

“.“.Parse():1516

“.“.•(BaseOperatorCollection , Resources , Page ):366

“.“.•():55

“.“..ctor(Page , TextSearchOptions , Boolean ):124

Aspose.Pdf.Text.TextFragmentAbsorber.Visit(Page page):41

(unknown).(Object , TextFragmentAbsorber ):-1

..():452

..(String path, FileType type, options):114

..(String path, FileType type, options):0

..(String filePath, String databaseGuid, Boolean checkFileDateTime, Boolean descForHtmlBasedEngine, Boolean descForImageBasedEngineWithoutTextSelection, Boolean saveToCustomTempStorage, Boolean returnConttents, progressCallback, openedDocument, Nullable`1 quality):1314

..(String filePath, options, String outputFolderParam):695

..(String filePath, options, String outputFolder):142

Groupdocs.Web.UI.Handlers.BaseHandler.(IEditingService viewingService, IUrlsCreator urlsCreator, a printableHtmlCreator, String guid, Boolean useHtmlBasedEngine, Boolean usePngImagesForHtmlBasedEngine, Nullable`1 count, Nullable`1 width, Nullable`1 quality, Boolean usePdf, Nullable`1 preloadPagesCount, Boolean convertWordDocumentsCompletely, String fileDisplayName, String watermarkText, Nullable`1 watermarkColor, WatermarkPosition watermarkPosition, Single watermarkFontSize, Boolean ignoreDocumentAbsence, Boolean supportPageRotation, String callback):458

Groupdocs.Web.UI.Controllers.GroupdocsViewerController.ViewDocument(String guid, Boolean useHtmlBasedEngine, Boolean usePngImagesForHtmlBasedEngine, Nullable`1 count, Nullable`1 width, Nullable`1 quality, Boolean usePdf, Nullable`1 preloadPagesCount, Boolean convertWordDocumentsCompletely, String fileDisplayName, String watermarkText, Nullable`1 watermarkColor, WatermarkPosition watermarkPosition, Single watermarkFontSize, Boolean ignoreDocumentAbsence, Boolean supportPageRotation, String callback):10

(unknown).lambda_method(Closure , ControllerBase , Object[] ):-1

System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters):0

System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters):106

System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters):0

System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState):0

System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult):0

System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1.End():41

System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult):0

System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters.b__3d():20

System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass46.b__3f():134

System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass46.b__3f():134

System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass33.b__32(IAsyncResult asyncResult):0

System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult):0

System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1.End():41

System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult):0

System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21+<>c__DisplayClass2b.b__1c():0

System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21.b__1e(IAsyncResult asyncResult):0



Thanks


Sam

Hi Sam,


We are sorry to hear that you have such issue. This error “NullReferenceException” means that you have passed to the ViewDocument object or it’s element which is Null or doesn’t exist. Sorry but with out your code and description for how to reproduce and when this error happens (with specific document or not, when upload the document etc.) I can’t reproduce and help you to fix it.

Please provide such info:
1. code example.
2. document example with which this happens
3. Version of the library
4. Info about your solution - is it MVC, Web Forms etc.
5. Which pipline mode you use

Best regards.