2011-01-16 7 views
0

Ich habe eine WPF/WinForms-Anwendung, die völlig in Ordnung, auf XP, sowie Win 7. Aber auf Vista, nur manchmal funktioniert - kann 20-30% der Zeit, die ich dies sehen sein:Access auf VISTA nur

Jede Hilfe ist sehr

geschätzt
Framework Version: v4.0.30319 
Description: The process was terminated due to an unhandled exception. 
Exception Info: System.AccessViolationException 
Stack: 
    at MS.Win32.PresentationCore.UnsafeNativeMethods+WICImagingFactory.CreateDecoderFromStream(IntPtr, IntPtr, System.Guid ByRef, UInt32, IntPtr ByRef) 
    at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(System.Uri, System.IO.Stream, System.Windows.Media.Imaging.BitmapCacheOption, System.Guid ByRef, Boolean ByRef, System.IO.Stream ByRef, System.IO.UnmanagedMemoryStream ByRef, Microsoft.Win32.SafeHandles.SafeFileHandle ByRef) 
    at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(System.Uri, System.Uri, System.IO.Stream, System.Windows.Media.Imaging.BitmapCreateOptions, System.Windows.Media.Imaging.BitmapCacheOption, System.Net.Cache.RequestCachePolicy, Boolean) 
    at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation() 
    at System.Windows.Media.Imaging.BitmapImage.EndInit() 
    at System.Windows.Forms.Integration.Convert.ToSystemWindowsMediaImagingBitmapImage(System.Drawing.Image) 
    at System.Windows.Forms.Integration.ElementHostPropertyMap.UpdateBackgroundImage(System.Windows.Forms.Integration.ElementHost) 
    at System.Windows.Forms.Integration.ElementHostPropertyMap.BackgroundPropertyTranslator(System.Object, System.String, System.Object) 
    at System.Windows.Forms.Integration.PropertyMap.RunTranslator(System.Windows.Forms.Integration.PropertyTranslator, System.Object, System.String, System.Object) 
    at System.Windows.Forms.Integration.PropertyMap.OnPropertyChanged(System.Object, System.String, System.Object) 
    at System.Windows.Forms.Integration.ElementHost.OnPropertyChanged(System.String, System.Object) 
    at System.Windows.Forms.Integration.ElementHost.UpdateBackground() 
    at System.Windows.Forms.Integration.ElementHost.OnVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.ScrollableControl.OnVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.ScrollableControl.OnVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.ScrollableControl.OnVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.Form.OnVisibleChanged(System.EventArgs) 
    at System.Windows.Forms.Control.SetVisibleCore(Boolean) 
    at System.Windows.Forms.Form.SetVisibleCore(Boolean) 
    at System.Windows.Forms.Control.set_Visible(Boolean) 
    at WeifenLuo.WinFormsUI.Docking.DockContentHandler.SetVisible() 
    at WeifenLuo.WinFormsUI.Docking.DockPane.set_ActiveContent(WeifenLuo.WinFormsUI.Docking.IDockContent) 
    at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Activate() 
    at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Show(WeifenLuo.WinFormsUI.Docking.DockPanel, WeifenLuo.WinFormsUI.Docking.DockState) 
    at WeifenLuo.WinFormsUI.Docking.DockContent.Show(WeifenLuo.WinFormsUI.Docking.DockPanel, WeifenLuo.WinFormsUI.Docking.DockState) 
    at MyApp.MainForm.OpenVisualSqlDesigner(Boolean, ToolkitUI.Model.Table) 
    at MyApp.Commands.TableCommands.VisualDesignerCommand.Execute() 
    at MyApp.Commands.CommandToolstripMenuItem.OnClick(System.EventArgs) 
    at System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs) 
    at System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs) 
    at System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType) 
    at System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType) 
    at System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs) 
    at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32) 
    at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef) 
    at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef) 
    at System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef) 
    at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef) 
    at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef) 
    at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr) 
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef) 
    at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32) 
    at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) 
    at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) 
    at System.Windows.Forms.Application.Run(System.Windows.Forms.Form) 

Antwort

1

es sieht aus wie diese Ausnahme trat auf, wenn die Anwendung eine Bitmap zu schaffen versuchte, es könnte Ihr System blockiert oder Schlösser sein, dass auf eine bestimmte Datei zuzugreifen, um das Bild zu laden benötigt wird, von ?

1

WIC, was Sie oben auf der Stack-Trace sehen, ist die zugrunde liegende Imaging-Bibliothek für WPF. Es ist eine COM-Komponente, die in C++ geschrieben ist. Es ist nicht ungewöhnlich für nicht verwalteten Code mit AccessViolation zu bombardieren. Sie können möglicherweise einige weitere Informationen aus der Stack-Ablaufverfolgung herausholen, indem Sie das Debuggen nicht verwalteten Codes aktivieren und den Microsoft Symbol Server aktivieren.

Dennoch sind die Chancen nicht gut, irgendeine Art von Delle in dieses Problem zu bringen. Die einzigen Knöpfe, die du einstellen kannst, sind das Bild selbst, es könnte auf eine Art und Weise beschädigt sein, die den Code bombardiert. Und stellen Sie sicher, dass das Service Pack 1 auf dem Computer installiert ist. Darüber hinaus benötigen Sie die Hilfe von Microsoft Support. Sie benötigen einen Minidump des Absturzprogramms und das Bild, das den Ärger verursacht.

0

Vielen Dank - und sehr hilfreich. Das Aktivieren des Debugging nicht verwalteten Codes führte zu dem Problem, dass "dies darauf hinweist, dass der Speicher an anderer Stelle beschädigt ist". Da ich nicht zu viel mit der Erinnerung fertig war, wusste ich, dass es eine der äußeren Dlls gewesen sein muss, auf die man sich bezieht. Es stellt sich heraus, dass ICSharpCode.TextEditor.dll ist die Wurzel des Problems, und die Aktualisierung auf die neueste Version davon behoben !!!