This is a migrated thread and some comments may be shown as answers.

Pdf viewer crashes before image from scanned PDF is rendered

9 Answers 121 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Kyle
Top achievements
Rank 1
Kyle asked on 11 Aug 2014, 02:56 PM
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.

9 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 12 Aug 2014, 10:54 AM
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.
 
0
Kyle
Top achievements
Rank 1
answered on 12 Aug 2014, 12:12 PM
Here's a link of the PDF:

https://www.dropbox.com/s/45zzbrbyga5ez9u/Scan0006.pdf
0
Deyan
Telerik team
answered on 13 Aug 2014, 11:02 AM
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.
 
0
Kyle
Top achievements
Rank 1
answered on 13 Aug 2014, 12:51 PM
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()
0
Deyan
Telerik team
answered on 15 Aug 2014, 08:26 AM
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.
 
0
Kyle
Top achievements
Rank 1
answered on 15 Aug 2014, 01:14 PM
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?
0
Kammen
Telerik team
answered on 20 Aug 2014, 09:02 AM
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.
 
0
Леонид
Top achievements
Rank 1
answered on 10 Nov 2015, 11:52 AM

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?

0
Tanya
Telerik team
answered on 13 Nov 2015, 09:01 AM
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
Tags
PDFViewer
Asked by
Kyle
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Kyle
Top achievements
Rank 1
Kammen
Telerik team
Леонид
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or