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

COMException: MILERR_WIN32ERROR, HRESULT: 0x88980003)'

3 Answers 1203 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Piotr
Top achievements
Rank 1
Piotr asked on 16 May 2017, 12:17 PM

I get following exception when I try to open some PDF document in RadPdfViewer.
The file can be properly open in AdobeReader.
System.Windows.Media.Imaging.WriteableBitmap..ctor is called with size 7016 x 20872 pixels

Exception message:
System.Runtime.InteropServices.COMException: 'MILERR_WIN32ERROR (Wyjątek od HRESULT: 0x88980003)'

with callstack:

w System.Windows.Media.Imaging.WriteableBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat, BitmapPalette palette)
   w Telerik.Windows.Media.Imaging.RadBitmap..ctor(Int32 width, Int32 height, Int32[] pixels)
   w Telerik.Windows.Documents.Fixed.UI.UIElementsHelper.CreateImageSource(RadFixedPage page, ImageResourceKey key, ImageSource source)
   w Telerik.Windows.Documents.Fixed.UI.UIElementsHelper.ImageLoader_WorkCompleted(Object sender, WorkCompletedEventArgs e)
   w Telerik.Windows.Documents.Utilities.ResourceLoader.OnWorkCompleted(WorkCompletedEventArgs args)
   w Telerik.Windows.Documents.Utilities.ResourceLoader.Worker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
   w System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   w System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   w System.Windows.Threading.DispatcherOperation.InvokeImpl()
   w System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   w MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   w System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   w MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   w System.Windows.Threading.DispatcherOperation.Invoke()
   w System.Windows.Threading.Dispatcher.ProcessQueue()
   w System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   w MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   w MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   w System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   w MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   w MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   w System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   w System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   w System.Windows.Application.RunDispatcher(Object ignore)
   w System.Windows.Application.RunInternal(Window window)
   w System.Windows.Application.Run(Window window)
   w System.Windows.Application.Run()

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 19 May 2017, 11:38 AM
Hello Piotr,

Thank you for contacting us.

We have already logged a feature request for improving the memory consumption for big monochrome images. However, as this is content specific we need to see the concrete PDF file in order to confirm that this is the same case. Could you provide link for downloading the sample file?

We are looking forward to contacting you again.

Regards,
Deyan
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Piotr
Top achievements
Rank 1
answered on 20 May 2017, 08:49 AM
0
Mihail
Telerik team
answered on 23 May 2017, 01:57 PM
Hello Piotr,

Thank you for the provided document. It seems that your scenario is different and it is related to the following bug report: OutOfMemoryException when viewing documents with large images.
If you would like to receive status updates please follow the item in our feedback portal.

As a possible workaround, you could try to use a 64-bit process for your application. This will allow the process to consume more memory.

Please excuse us for the inconvenience.

Regards,
Mihail
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PDFViewer
Asked by
Piotr
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Piotr
Top achievements
Rank 1
Mihail
Telerik team
Share this question
or