Error: No imaging component suitable to complete this operation was found.

3998
12
07-26-2011 12:17 PM
MarkCollins
Occasional Contributor
When launching my application today I am receiving the following error. I am loading the ESRI online streets basemap. Everything has worked fine with no change up until today. Is any one else experiencing this error? Any suggestions on the proper way to handle this?

No imaging component suitable to complete this operation was found.    at MS.Internal.HRESULT.Check(Int32 hr)
   at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
   at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
   at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
   at ESRI.ArcGIS.Client.TiledLayer.tileLoadCompleted(ImageTileInfo data, Stream imgStream, Exception error)
   at ESRI.ArcGIS.Client.TiledLayer.client_DownloadDataCompleted(Object sender, DownloadDataCompletedEventArgs e)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
0 Kudos
12 Replies
JenniferNery
Esri Regular Contributor
Can you share us some code and steps to reproduce this error?
0 Kudos
MarkCollins
Occasional Contributor
This issue seems to have resolved its self within a few hours with no changes to code on my end. I think the public rest services were spitting out some incorrectly formatted data for a while or the servers could have been down.
0 Kudos
S3TelInc
New Contributor
Hi,
Suddenly today when running my application i'm getting the same exception and application crashes. its a WPF application and using ArcGIS online services for StreetMapLayer. I don't get it on start-up but when application is loading few graphics on the map and changing the extent of the Map.

<esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>


Strangely though if i use the same Layer in another sample applicaiton that only displays the Map control with StreetMapLayer  nothing goes wrong.

Any idea what exactly might be the cause of this strange behavior?

System.NotSupportedException was unhandled
  Message=No imaging component suitable to complete this operation was found.
  Source=PresentationCore
  StackTrace:
       at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
       at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
       at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
       at ESRI.ArcGIS.Client.TiledLayer.tileLoadCompleted(ImageTileInfo data, Stream imgStream, Exception error)
       at ESRI.ArcGIS.Client.TiledLayer.client_DownloadDataCompleted(Object sender, DownloadDataCompletedEventArgs e)
       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.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       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.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(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.Application.RunInternal(Window window)
       at System.Windows.Application.Run()
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Runtime.InteropServices.COMException
       Message=Exception from HRESULT: 0x88982F50
       ErrorCode=-2003292336
       InnerException: 
0 Kudos
JenniferNery
Esri Regular Contributor
According to Mark who posted the same stack trace, the issue seemed to have been resolved without code change so it might have been the service you are hitting.
0 Kudos
S3TelInc
New Contributor
According to Mark who posted the same stack trace, the issue seemed to have been resolved without code change so it might have been the service you are hitting.


It is the service i'm hitting but a day has gone by and i'm still getting the same exception. one thing i have found out so far is that it has something to do with the graphics or feature layer. Even in Sample application just adding a feature layer and graphics layer produces this problem.

attached is the application which actually does reproduces the problem. its not consistent though
0 Kudos
S3TelInc
New Contributor
well now its confirmed that its problem with the services.
i wasn't able to reproduce the problem with NatGeoWorldMap service

http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer
0 Kudos
LuisGarcia2
Occasional Contributor II
I am working on a WPF application as well. I have not made any changes to the application for almost two weeks and it was working fine before I left on vacation. I just came back, opened the application and got this error. I am currently hitting this service:

http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer

I can see the map flash by as the application open and a millisecond later it crashes and returns this same error stack. So, I guess there is something going on again.

Thanks!
0 Kudos
LuisGarcia2
Occasional Contributor II
There is definitely an issue with that service. I switched to this:

http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer

And now the application opens without a problem. Now, my question, how and where do I catch this error? 

Thanks!
0 Kudos
LuisGarcia2
Occasional Contributor II
Any word on this? Is there a place where we can report bugs? It sure looks like one.
Thanks!
0 Kudos