Pdf viewer crashes before image from scanned PDF is rendered

10 posts, 0 answers
  1. Kyle
    Kyle avatar
    8 posts
    Member since:
    Mar 2014

    Posted 11 Aug 2014 Link to this post

    I am loading a scanned PDF in the PDFViewer and if I navigate away from the page that is loading the pdf before the image of the pdf is finished rendering it causes the following exception: "The given key was not present in the dictionary"

    I believe the exception comes from ImageLoader_WorkCompleted method from the Telerik.Windows.Documents.Fixed dll.
  2. Deyan
    Admin
    Deyan avatar
    137 posts

    Posted 12 Aug 2014 Link to this post

    Hello Kyle,

    Thank you for contacting us. 

    We have tried to reproduced the issue but without any success. Could you please send us a sample PDF document and some detailed steps to reproduce the exception.

    I am looking forward to contacting you again.

    Regards,
    Deyan
    the Telerik team
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Kyle
    Kyle avatar
    8 posts
    Member since:
    Mar 2014

    Posted 12 Aug 2014 Link to this post

    Here's a link of the PDF:

    https://www.dropbox.com/s/45zzbrbyga5ez9u/Scan0006.pdf
  5. Deyan
    Admin
    Deyan avatar
    137 posts

    Posted 13 Aug 2014 Link to this post

    Hello Kyle,

    I have tried the following steps:
    • Scroll the PDF content while the viewer still loads the page. As there is a single page in the sent document there is no way to scroll away from the first page. As a result no exception is reproduced.
    • Reduce the size of the PdfViewer's presenter to zero. This does not cause any exception as well.
    Could you please provide us with the exact steps you do to reproduce the issue? This way we would be able to investigate it easier.

    I am looking forward to your reply.

    Regards,
    Deyan
    the Telerik team
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  6. Kyle
    Kyle avatar
    8 posts
    Member since:
    Mar 2014

    Posted 13 Aug 2014 in reply to Deyan Link to this post

    I navigate to one WPF user control to another that has the PDF viewer in it.  The PDF is loaded, but the image has not rendered and I navigate back to the previous user control where the exception occurs.

    Here is the stack trace as well:

    ​Date:        8/11/2014 9:28:10 AM
    Operator:    XXX
    Program:     Patient
    Mutex:       PatientExternal Documents
    Message:     The given key was not present in the dictionary.
    Stack Trace:
       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       at Telerik.Windows.Documents.Fixed.UI.UIElementsHelper.ImageLoader_WorkCompleted(Object sender, WorkCompletedEventArgs e)
       at Telerik.Windows.Documents.Core.Utils.ResourceLoader.OnWorkCompleted(WorkCompletedEventArgs args)
       at Telerik.Windows.Documents.Core.Utils.ResourceLoader.Worker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
       at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Patient.App.Main()
  7. Deyan
    Admin
    Deyan avatar
    137 posts

    Posted 15 Aug 2014 Link to this post

    Hello Kyle,

    Looking at the history of the ImageLoader_WorkCompleted method it seems that there used to be such issue in the past. This issue seems to be fixed in the latest version of the control. Could you please check if you reproduce the exception with the latest internal build binaries?

    I am looking forward to your reply.

    Regards,
    Deyan
    the Telerik team
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  8. Kyle
    Kyle avatar
    8 posts
    Member since:
    Mar 2014

    Posted 15 Aug 2014 in reply to Deyan Link to this post

    The latest version of the control we have is from Q3 2013 SP2.  So I can't test it with the newest version.  Is there a way I can catch the exception?
  9. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 20 Aug 2014 Link to this post

    Hi Kyle,

    Unfortunately this exception is too deep in our internal code and cannot be handled properly. I'm afraid there is not much else we can suggest.

    We are sorry for the inconvenience.

    Regards,
    Kammen
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  10. Леонид
    Леонид avatar
    1 posts
    Member since:
    Nov 2015

    Posted 10 Nov 2015 Link to this post

    Hi everybody, I also have crash like that in my software using 2013 Q3 Telerik controls.

    Could please inform at what version this crash are supposed to be fixed?

  11. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 13 Nov 2015 Link to this post

    Hello Леонид,

    The fix for the issue discussed in this thread is included in the Q1 2014 official release. However, we recommend using the latest version of the controls to take advantage of the new features and bug fixes included in it.

    Regards,
    Tanya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready