2011-01-16 9 views
0

私は時々、XP上で完全に正常に動作WPF/Winformsのアプリケーションを持っているだけでなく、勝つ7しかし、Vista上で - 私はこの参照時間20〜30%とすることができる:AccessViolationExceptionのみ

すべてのヘルプは非常にそれはあなたのシステムのブロックまたはロックから画像をロードするために必要とされる特定のファイルにアクセスすることを可能性があり、

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) 

答えて

1

アプリケーションがBitmapImageのを作成しようとしたときに、この例外が発生したように見え高く評価され?

1

WIC、スタックトレースの最上部に表示されるものは、WPF用のイメージングライブラリです。これはC++で書かれたCOMコンポーネントです。 ではありません。では、管理対象外のコードがAccessViolationで爆発することは珍しいです。アンマネージコードのデバッグを有効にし、Microsoft Symbol Serverを有効にすることで、スタックトレースの情報をさらに絞り込むことができます。

しかし、この問題では、どんな種類の凹みを置いてもオッズは良くありません。あなたが調整できる唯一のノブは画像そのものです。コード爆弾を作る方法では壊れているかもしれません。また、サービスパック1がマシンにインストールされていることを確認してください。これ以外にも、Microsoftサポートからのサポートが必要です。彼らは、クラッシュするプログラムのミニダンプとトラブルを引き起こすイメージを必要とします。

0

ありがとう、非常に参考になりました。アンマネージドコードのデバッグをオンにすると、「メモリが他の場所で壊れている」という問題が発生しました。あまりにも多くのメモリを詰め込んでいないので、参照されていた外部dllの1つであったに違いないことは分かっていました。 ICSharpCode.TextEditor.dllが問題の根源であることが判明し、最新のバージョンに更新すると修正されました。

関連する問題