I have this code that pulls an image down from a url
<Windowx:Class="ImageTest.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"Title="MainWindow"Height="350"Width="525"><Grid><ImageSource="http://theworldsnotes.com/images/Spoils_logo_trans.png"/></Grid></Window>
Works fine in most cases, but some users are experiencing the following exception
System.OutOfMemoryException: There is not enough memory to continue the execution of a program vid System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) vid MS.Win32.WinInet.get_InternetCacheFolder() vid System.Windows.Media.Imaging.BitmapDownload.BeginDownload(BitmapDecoder decoder, Uri uri, RequestCachePolicy uriCachePolicy, Stream stream) vid System.Windows.Media.Imaging.LateBoundBitmapDecoder..ctor(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy requestCachePolicy) vid System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache) vid System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy) vid System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) vid MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward) vid MS.Internal.Data.DefaultValueConverter.ConvertFrom(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture) vid System.Windows.Data.BindingExpression.ConvertHelper(IValueConverter converter, Object value, Type targetType, Object parameter, CultureInfo culture) vid System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange) vid MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange) vid MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView) vid MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName) vid System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType) vid System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list) vid System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args) vid System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) vid MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) vid System.Windows.Threading.DispatcherOperation.InvokeImpl() vid System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) vid System.Windows.Threading.DispatcherOperation.Invoke() vid System.Windows.Threading.Dispatcher.ProcessQueue() vid System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) vid MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) vid MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) vid System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) vid MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) vid System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) vid MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) vid MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) vid System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) vid System.Windows.Application.RunInternal(Window window) vid System.Windows.Application.Run()
The user is running Windows 7 64bit, with .net 4.5 installed (applicatoin is .net 4.0).
I had them run the repair tool, and also reinstall .net.
I even created an app that just used WebClient to download the images and save them to files, and they came through fine. It's also not just one image url that doesn't work, it's about any image url I can throw at the program(from different domains etc).
The user also has avast and microsoft security essentials, but you'd think that would have blocked the other test app from downloading the images correctly.
Any ideas what might be causing this? I have no clue, seems like a bug, I'm leaning toward graphics card driver issue, but not sure.
You can also view more details(comments and bigger stack trace) from the same question I posted on stack overflow http://stackoverflow.com/questions/18248447/outofmemoryexception-on-url-source