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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Application crashes when looking at PDF file - System.Collections.Generic.KeyNotFoundException

Thread ID:

Created:

Updated:

Platform:

Replies:

144361 May 2,2019 02:09 PM UTC May 3,2019 08:41 AM UTC Xamarin.Forms 1
loading
Tags: PdfViewer
Vadim Koystinen
Asked On May 2, 2019 02:09 PM UTC

Captured following error condition in production.
Don't have exact PDF file that caused a problem, but stack-trace seems specific enough to address the problem.

Syncfusion library version used: 16.4.0.54
Device: Pixel 2
OS Version: 9

PdfMainObjectCollection.GetObject (Syncfusion.Pdf.Primitives.PdfReference reference)

System.Collections.Generic.KeyNotFoundException: The given key '88' was not present in the dictionary.

  • Dictionary`2[TKey,TValue].get_Item (TKey key)
  • PdfMainObjectCollection.GetObject (Syncfusion.Pdf.Primitives.PdfReference reference)
  • PdfReferenceHolder.ObtainObject ()
  • PdfReferenceHolder.get_Object ()
  • PdfCrossTable.GetObject (Syncfusion.Pdf.Primitives.IPdfPrimitive pointer)
  • PdfLoadedPageCollection.get_Count ()
  • PdfLoadedPageCollection.GetParent (System.Int32 index, System.Int32& localIndex, System.Boolean zeroValid, System.Boolean enableFastFetching)
  • PdfLoadedPageCollection.GetPage (System.Int32 index)
  • PdfLoadedPageCollection.get_Item (System.Int32 index)
  • LinearLayoutEx.InitializeLayout ()
  • HorizontalScrollViewEx.Initializelayout ()
  • ScrollViewEx.InitializeLayout ()
  • ScrollViewEx.LoadDocument (System.IO.Stream inputStream)
  • SfPdfDocumentViewRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e)
  • (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
  • BindableObject.OnPropertyChanged (System.String propertyName)
  • Element.OnPropertyChanged (System.String propertyName)
  • BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent)
  • BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes)
  • BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess)
  • BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value)
  • DocumentViewHelper.set_InputFileStream (System.IO.Stream value)
  • SfPdfViewer.OnPdfViewerPropertyChanged (System.String propertyName)
  • SfPdfViewer.OnInputFileStreamChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue)
  • BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent)
  • BindableObject.


  • Sathish Sivakumar [Syncfusion]
    Replied On May 3, 2019 08:41 AM UTC

    Hi Vadim, 
     
    Greetings from Syncfusion. 
     
    We tried to reproduce the issue “Application crashes with System.Collections.Generic.KeyNotFoundException” in our side, but the PDF document is displayed properly in SfPdfViewer with v16.4.0.54. We suspect that the issue is specific to the PDF document loaded into SfPdfViewer. We recommend you to update the SfPdfViewer to the latest stable version and share the following details if you still face the same issue. 
     
    1. PDF document with which the issue could be reproduced.
    2. Modify/Simple sample to reproduce the issue.
    3. Replication procedure to reproduce the issue.
    4. Xamarin.Forms version
    5. Android support library version details
     
    Please find the sample with which we tried to reproduce the reported issue in our side. 


    Regards, 
    Sathish 


    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.

    Please sign in to access our forum

    This page will automatically be redirected to the sign-in page in 10 seconds.

    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

    Live Chat Icon For mobile
    Live Chat Icon