由于奇怪的DLL错误导致WPF应用程序无法启动

时间:2015-05-13 07:25:56

标签: c# wpf dll

更新:下面描述的错误也发生在一个空的Windows窗体应用程序中。

我在C#中有一个简单的WPF应用程序,可以与Bing maps API一起使用。

除了显示通过xaml代码集成的Bing地图外,该应用程序不执行任何操作:

<m:Map CredentialsProvider="my api key that I removed here" 
       x:Name="myMap"
       Center="47.620574,-122.34942" ZoomLevel="12" Height="Auto" 
       "/>

除了Microsoft.Maps.MapControl.WPF之外,我没有引用任何特定的第三方库。

当我运行应用程序时,它会退出而不会给出任何特定的错误消息。通过使用eventvwr检查错误日志,我发现它存在于AppData\Local\Admworks文件夹中的某些dll文件存在问题。该文件可能是动态生成的,因为每次重新启动计算机时它都有不同的名称。第一次是jgmrysmv.dll,第二次是gfphosrs.dll,依此类推。 如果我重命名应用程序的Admworks文件夹。但是,当我重新启动计算机时,问题返回。 Admworks文件夹仍然存在,并且dll文件的名称不同。

这是事件查看器中报告的错误:

Faulting application name: WpfApplication2.vshost.exe, version: 12.0.30723.0, time stamp: 0x53cf4fe5
Faulting module name: gfphosrs.dll, version: 0.0.0.0, time stamp: 0x5547e370
Exception code: 0xc000041d
Fault offset: 0x000024ce
Faulting process ID: 0xcbc
Faulting application start time: 0x01d08d4c5b92cf13
Faulting application path: C:\Users\alber_000\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2\bin\Debug\WpfApplication2.vshost.exe
Faulting module path: C:\Users\alber_000\AppData\Local\Admworks\gfphosrs.dll
Report ID: 9a3939cb-f93f-11e4-bf2f-74e5437876cd
Faulting package full name: 
Faulting package-relative application ID: 

这是我在调试窗口中得到的输出:

'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\Users\alber_000\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2\bin\Debug\WpfApplication2.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x1db0 has exited with code 259 (0x103).
The thread 0x1d78 has exited with code 0 (0x0).
The thread 0x1d80 has exited with code 259 (0x103).
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\Users\alber_000\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2\bin\Debug\WpfApplication2.exe'. Symbols loaded.
The program '[7516] WpfApplication2.vshost.exe' has exited with code -1073740771 (0xc000041d).

我尝试将断点放在InitializeComponent()

public MainWindow()
{
  InitializeComponent();
} 

但应用程序在到达该点之前就停止了。

1 个答案:

答案 0 :(得分:1)

还没解决?尝试编译为32位而不是64位?经常导致dll问题。