Select to view content in your preferred language

SetupDecoderFromUriOrStream when loading Map from ArcGIS

1181
2
11-10-2011 06:44 AM
Labels (1)
BKuiper
Frequent Contributor
It seems that Esri is doing some updates on some of their maps which causes this following exception to be thrown:

System.NotSupportedException
No imaging component suitable to complete this operation was found.
   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 System.Windows.Media.Imaging.BitmapImage.EndInit()
   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.Net.WebClient.OnDownloadDataCompleted(DownloadDataCompletedEventArgs e)
   at System.Net.WebClient.DownloadDataOperationCompleted(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)


How can I catch this exception for the layer ? It seems this exception is now thrown on a background thread and crashes the whole app. This exception should be reported to InitializationFailed on the Layer.

It happens when loading the following through XAML

            <esri:ArcGISTiledMapServiceLayer ID="BaseLayer" 
          Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
0 Kudos
2 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

Thanks for the post - we'll investigate.

Cheers

Mike
0 Kudos
BKuiper
Frequent Contributor
Thanks, i will make sure i will report bugs throught the Beta community website in the future. (just found out that's possible as well)
0 Kudos