调试托管应用程序崩溃

时间:2010-02-15 13:40:04

标签: .net debugging crash crash-dumps

我正在绝望地尝试调试我正在尝试发布的应用程序。它是在Win7 x64上创建的,并且在Win x32上运行良好,但在XP上运行不正常(没有Vista进行测试)。

我通过将_NT_SYMBOL_PATH设置为XP中应用程序的目录来创建转储文件,然后运行调试器:   adplus -crash -pn launchmenot.exe

这会创建一个我在Visual Studio 2008中打开的转储文件(在VS中指定了应用程序的PDB和MS符号服务器的目录。在VS下载了我刚刚获得的所有符号后'没有源代码可用于当前位置'。

我有一种感觉,可能是在XP上使用Win7的Interop.IWshRuntimeLibrary,但我真的不知道。

转储文件是107Mb,但应用程序本身在线here(在调试模式下编译)。有人能指出我找到原因或修正错误的正确方向吗?

非常感谢。 :)

3 个答案:

答案 0 :(得分:3)

此错误消息对您意味着什么:

  

无法转换字符串   '包://应用:,,, /资源/ icon.ico'   在属性'Icon'到类型的对象   'System.Windows.Media.ImageSource'。   图像格式无法识别。   对象出错   在'LaunchMeNot.WinUnhandledException'中   标记文件   'LaunchMeNot;组件/ winunhandledexception.xaml'   10号线位置46。

编辑:最后一个异常实际上是从未处理的异常过滤器抛出并变得致命。有两个内部异常更详细地描述了这个问题。 这一切都从这个痕迹开始:

0012e44c 7c812afb [HelperMethodFrame: 0012e44c] 
0012e4f0 54fc6b82 System.Windows.Media.PixelFormat.GetPixelFormat(System.Windows.Media.SafeMILHandle)
0012e534 547ca498 System.Windows.Media.Imaging.BitmapSource.UpdateCachedSettings()
0012e56c 547ca431 System.Windows.Media.Imaging.BitmapSource.set_WicSourceHandle(System.Windows.Media.Imaging.BitmapSourceSafeMILHandle)
0012e598 547ca198 System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()
0012e5c8 54fc6e86 System.Windows.Media.Imaging.BitmapSource.CompleteDelayedCreation()
0012e5f4 547cb3a8 System.Windows.Media.Imaging.BitmapSource.get_PixelWidth()
0012e600 56290f1f MS.Internal.AppModel.IconHelper.GetBestMatch(System.Collections.ObjectModel.ReadOnlyCollection`1<System.Windows.Media.Imaging.BitmapFrame>, Int32, Int32, Int32)
0012e678 5629168f MS.Internal.AppModel.IconHelper.GetIconHandlesFromBitmapFrame(System.Object, System.Windows.Media.Imaging.BitmapFrame, IconHandle ByRef, IconHandle ByRef)
0012e698 565df5fd System.Windows.Window.UpdateIcon()
0012e6b0 55c8ed3a System.Windows.Window.SetupInitialState(Double, Double, Double, Double)
0012e854 55c266c8 System.Windows.Window.CreateSourceWindowImpl()
0012e8d0 55c264b9 System.Windows.Window.SafeCreateWindow()
0012e8dc 55c263c1 System.Windows.Window.ShowHelper(System.Object)
0012e904 55c8e3b8 System.Windows.Window.Show()
0012e910 562076e7 System.Windows.Window.ShowDialog()
0012e984 00f70556 LaunchMeNot.App.OnStartup(System.Windows.StartupEventArgs)
0012e9f8 55bed4b9 System.Windows.Application.<.ctor>b__0(System.Object)
0012ea08 578461fa System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Boolean)
0012ea2c 578460ea System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Boolean, System.Delegate)
0012ea74 578442b4 System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Boolean, System.Delegate)
0012ea94 5784912d System.Windows.Threading.DispatcherOperation.InvokeImpl()
0012eac0 578490b8 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
0012eac8 792f5681 System.Threading.ExecutionContext.runTryCode(System.Object)
0012eef0 79e71b4c [HelperMethodFrame_PROTECTOBJ: 0012eef0] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
0012ef58 792f5577 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
0012ef74 792e01c5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
0012ef8c 57848ff3 System.Windows.Threading.DispatcherOperation.Invoke()
0012efc4 57843957 System.Windows.Threading.Dispatcher.ProcessQueue()
0012f0a0 57843c43 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
0012f0ec 578463de MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
0012f138 5784630a MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
0012f148 578461fa System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Boolean)
0012f16c 578460ea System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Boolean, System.Delegate)
0012f1b4 578442b4 System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Boolean, System.Delegate)
0012f1d4 57843411 System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Boolean)
0012f218 57843360 System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority, System.Delegate, System.Object)
0012f23c 57845a4c MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
0012f3b4 0036217b [NDirectMethodFrameStandalone: 0012f3b4] MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
0012f3c4 57843a57 System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
0012f414 57843129 System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
0012f420 578430cc System.Windows.Threading.Dispatcher.Run()
0012f42c 55bed47e System.Windows.Application.RunDispatcher(System.Object)
0012f438 55bec77f System.Windows.Application.RunInternal(System.Windows.Window)
0012f45c 55bd3a96 System.Windows.Application.Run(System.Windows.Window)
0012f46c 55bd3a59 System.Windows.Application.Run()
0012f478 00f700bc LaunchMeNot.App.Main()

清楚地表明图像资源存在问题。 嵌入的异常是:

  

HRESULT的异常:0x88982F07

包裹着:

  

图像格式无法识别。

经过一番谷歌搜索后,我遇到了this post,其中详细介绍了类似的发现。看起来像一个无法识别的格式的图标。该帖子继续建议删除图标。我的猜测是你可以尝试在兼容的编辑器中重做它们。

答案 1 :(得分:1)

你可能在wndbg上有点运气 - 从the Debugging Tools for Windows page下载。加载故障转储,设置符号路径并运行!analyze -v以获取有关崩溃的详细信息。如果您仍然无法找到正确的符号,请尝试运行!sym noisy以及!itoldyouso命令

答案 2 :(得分:0)

使用WinDebug分析转储 - 它也可以用于托管代码。

有关详细信息,请参阅Tess Ferrandez的blog entries

相关问题