Application Crash (Unhandled Exception) if accessing options for second time during same session

Topics: Problems
Feb 22, 2012 at 10:48 PM

Hello,

I get an unhandled exception if I try to access the options for a second time during the same session.  This is happening on Windows XP, latest SP.  Steps to reproduce:

1. Access options, click okay.

1. Access options again, an unhandled exception is thrown with the following error output:

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************System.Windows.Markup.XamlParseException: Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception. ---> System.IO.FileFormatException: The image format is unrecognized. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x88982F07   --- End of inner exception stack trace ---   at System.Windows.Media.PixelFormat.GetPixelFormat(SafeMILHandle bitmapSource)   at System.Windows.Media.Imaging.BitmapSource.UpdateCachedSettings()   at System.Windows.Media.Imaging.BitmapSource.set_WicSourceHandle(BitmapSourceSafeMILHandle value)   at System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()   at System.Windows.Media.Imaging.BitmapSource.CompleteDelayedCreation()   at System.Windows.Media.Imaging.BitmapSource.get_WicSourceHandle()   at System.Windows.Media.Imaging.BitmapFrameDecode..ctor(Int32 frameNumber, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, BitmapFrameDecode frameDecode)   at System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(BitmapDecoder decoder, ReadOnlyCollection`1 frames)   at System.Windows.Media.Imaging.BitmapDecoder.Initialize(BitmapDecoder decoder)   at System.Windows.Media.Imaging.BitmapDecoder..ctor(SafeMILHandle decoderHandle, BitmapDecoder decoder, Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, Boolean insertInDecoderCache, Boolean isOriginalWritable, Stream uriStream, UnmanagedMemoryStream unmanagedMemoryStream, SafeFileHandle safeFilehandle)   at System.Windows.Media.Imaging.IconBitmapDecoder..ctor(SafeMILHandle decoderHandle, BitmapDecoder decoder, Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, Boolean insertInDecoderCache, Boolean originalWritable, 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.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy)   at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)   at System.Windows.Baml2006.TypeConverterMarkupExtension.ProvideValue(IServiceProvider serviceProvider)   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)   --- End of inner exception stack trace ---   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)   at Finestra.OptionsWindow.InitializeComponent()   at Finestra.OptionsWindow..ctor(VirtualDesktopManager vdm)   at Finestra.MainUiPlugin.hk_HotKeyPressed(String id)   at Finestra.MainUiPlugin.VDM_GlobalCommand(String command)   at Finestra.VirtualDesktopManager.SendGlobalCommand(String command)   at Finestra.MainUiPlugin.OptionsToolStripMenuItem_Click(Object sender, EventArgs e)   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)   at System.Windows.Forms.ToolStrip.WndProc(Message& m)   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************mscorlib    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300)    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------VirtualDesktops    Assembly Version: 2.5.4436.26118    Win32 Version: 2.5.4436.26118    CodeBase: file:///C:/Program%20Files/Finestra/VirtualDesktops.exe----------------------------------------System    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.236 built by: RTMGDR    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Windows.Forms    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.235 built by: RTMGDR    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------Microsoft.VisualBasic    Assembly Version: 10.0.0.0    Win32 Version: 10.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System.Core    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.225 built by: RTMGDR    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll----------------------------------------Z-Pixel    Assembly Version: 1.1.0.0    Win32 Version: 1.1.0.0    CodeBase: file:///C:/Program%20Files/Finestra/Z-Pixel.DLL----------------------------------------Microsoft.WindowsAPICodePack    Assembly Version: 1.1.0.0    Win32 Version: 1.1.0.0    CodeBase: file:///C:/Program%20Files/Finestra/Microsoft.WindowsAPICodePack.DLL----------------------------------------System.Configuration    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------PresentationCore    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.225 built by: RTMGDR    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll----------------------------------------WindowsBase    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.225 built by: RTMGDR    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll----------------------------------------System.Xaml    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll----------------------------------------System.Xml    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.225 built by: RTMGDR    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------bmwkmuv5    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.236 built by: RTMGDR    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------PresentationFramework    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.225    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll----------------------------------------Microsoft.WindowsAPICodePack.Shell    Assembly Version: 1.1.0.0    Win32 Version: 1.1.0.0    CodeBase: file:///C:/Program%20Files/Finestra/Microsoft.WindowsAPICodePack.Shell.DLL----------------------------------------System.Security    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll----------------------------------------Accessibility    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll----------------------------------------UIAutomationProvider    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll----------------------------------------System.Data.SqlXml    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.SqlXml/v4.0_4.0.0.0__b77a5c561934e089/System.Data.SqlXml.dll----------------------------------------Microsoft.JScript    Assembly Version: 10.0.0.0    Win32 Version: 10.0.30319.1    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.JScript/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.JScript.dll----------------------------------------SlimDX    Assembly Version: 4.0.13.43    Win32 Version:     CodeBase: file:///C:/Program%20Files/Finestra/SlimDX.DLL----------------------------------------WindowsFormsIntegration    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll----------------------------------------WPFToolkit.Extended    Assembly Version: 1.6.0.0    Win32 Version: 1.6.0.0    CodeBase: file:///C:/Program%20Files/Finestra/WPFToolkit.Extended.DLL----------------------------------------PresentationFramework.Luna    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Luna/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Luna.dll----------------------------------------UIAutomationTypes    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1 built by: RTMRel    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll----------------------------------------
************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.
For example:
<configuration>    <system.windows.forms jitDebugging="true" /></configuration>
When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.