简体   繁体   English

WPF应用程序在Windows Server 2008上崩溃

[英]WPF application crashing on Windows Server 2008

I received an error report regarding a WPF app that wouldn't start up in a Windows Server 2008 Service pack 2 server (the application is an administration tool we're distributing to our customers). 我收到了有关WPF应用程序的错误报告,该错误报告无法在Windows Server 2008 Service Pack 2服务器中启动(该应用程序是我们正在分发给客户的管理工具)。 Since this application has a lot of external references, I tried to simplify the problem by creating a simple WPF application using Visual Studio 2013: a plain white window with "hello world" showing and nothing more. 由于此应用程序具有大量外部引用,因此我尝试通过使用Visual Studio 2013创建一个简单的WPF应用程序来简化此问题:一个显示“ hello world”的纯白色窗口,仅此而已。 I tried to make it run in the production server, with no luck: it always crashes immediately. 我试图使其在生产服务器中运行,但是没有运气:它总是立即崩溃。

Here's what I have: 这是我所拥有的:

  • the application was created with the standard VS 2013 template for WPF, so it had 3.5 as the target framework; 该应用程序是使用WPF的标准VS 2013模板创建的,因此它的目标框架为3.5; i changed it to 4.6 我将其更改为4.6
  • the server has the 3.5 SP1 and 4.6 versions of the .net framework installed 服务器已安装3.5 SP1和4.6版本的.net框架
  • the app.config is well-formed, with the configSections section on top, no additional references besides log4net, supportedRuntime tag set according to the target framework version app.config的格式正确,顶部有configSections部分,除log4net, supportedRuntime标记(根据目标框架版本设置)外,没有其他参考
  • I already checked that there are no project references from version 3.5 left in the project 我已经检查了项目中是否没有版本3.5的项目引用
  • I already tried logging in the DispatcherUnhandledException and in the AppDomain.UnhandledException handlers 我已经尝试在DispatcherUnhandledExceptionAppDomain.UnhandledException处理程序中登录
  • the application runs in my development environment 该应用程序在我的开发环境中运行
  • the application runs in production environment only if I change the target framework to 3.5. 仅当我将目标框架更改为3.5时,应用程序才能在生产环境中运行。 In this case, the WPF windows shows up and the log file is correctly produced 在这种情况下,将显示WPF窗口,并且正确生成了日志文件
  • I already tried producing a dump and trying to debug it in Visual Studio: I just get a "Source not available" message and a stack trace ending with ntdll.dll!NtWaitForSingleObject() 我已经尝试产生转储并尝试在Visual Studio中调试它:我只是收到“ Source not available”消息和以ntdll.dll结尾的堆栈跟踪!NtWaitForSingleObject()

Here are the error details: 错误详细信息如下:

Description: 描述:

Stopped working 停止工作

Problem signature: 问题签名:

Problem Event Name: APPCRASH 问题事件名称:APPCRASH

Application Name: MyApp.exe 应用名称:MyApp.exe

Application Version: 1.0.0.0 应用版本:1.0.0.0

Application Timestamp: 5bfc07f1 应用时间戳:5bfc07f1

Fault Module Name: KERNEL32.dll 故障模块名称:KERNEL32.dll

Fault Module Version: 6.0.6002.24367 故障模块版本:6.0.6002.24367

Fault Module Timestamp: 5ae3dcd9 故障模块时间戳:5ae3dcd9

Exception Code: e0434352 异常代码:e0434352

Exception Offset: 000000000001667d 异常偏移量:000000000001667d

OS Version: 6.0.6002.2.2.0.272.7 操作系统版本:6.0.6002.2.2.0.272.7

Locale ID: 1033 区域设置ID:1033


The Windows event log shows little information: Windows事件日志显示的信息很少:

Faulting application MyApp.exe, version 1.0.0.0, time stamp 0x5bfc07f1, faulting module KERNEL32.dll, version 6.0.6002.24367, time stamp 0x5ae3dcd9, exception code 0xe0434352, fault offset 0x000000000001667d, process id 0x%9, application start time 0x%10. 错误的应用程序MyApp.exe,版本1.0.0.0,时间戳0x5bfc07f1,错误的模块KERNEL32.dll,版本6.0.6002.24367,时间戳0x5ae3dcd9,异常代码0xe0434352,错误偏移量0x000000000001667d,进程ID 0x%9,应用程序启动时间0x%10 。

Application: MyApp.exe 应用程序:MyApp.exe

Framework Version: v4.0.30319 框架版本:v4.0.30319

Description: The process was terminated due to an unhandled exception. 说明:由于未处理的异常,进程已终止。

Exception Info: exception code e0434352, exception address 0000000077A6667D 异常信息:异常代码e0434352,异常地址0000000077A6667D

Stack: [this is empty] 堆栈:[此为空]


Any suggestions? 有什么建议么?

Just in case someone else stumbles on the same problem, looks like the KB4457921 update from Microsoft somehow solves the issue. 以防万一有人偶然发现相同的问题,看起来Microsoft的KB4457921更新以某种方式解决了该问题。 If an update is not possible, consider porting the code back to .net framework v. 3.5. 如果无法进行更新,请考虑将代码移植回.net framework v。3.5。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM