我希望有人可以告诉我可能导致此错误的原因:
尝试读取或写入受保护的内存.这通常表明其他内存已损坏.
我不能真正发布代码,因为这个错误似乎被抛出应用程序的任何随机区域.应用程序将在抛出错误之前的12-48小时内运行.有时它会在一个看似随机的位置停止并抛出上述错误,其他时候整个应用程序停止并且我得到一个错误的屏幕,上面写着"有一个致命的错误...这可能是一个CLR中的错误或......"关于PInvoke或其他非相关信息的内容.发生这种情况时,所有线程都显示终止,并且没有可用的调试信息.
简而言之,这就是应用程序的作用:
它是一个完全用C#编写的多线程服务器应用程序.客户端通过套接字连接到服务器.服务器为客户端运行虚拟"环境",以便他们可以相互交互并与环境进行交互.它消耗了相当多的内存,但我没有看到它泄漏.它通常消耗大约1.5GB.我认为它没有泄漏,因为内存使用在应用程序运行的整个时间内保持相对稳定.即使客户端没有做任何事情,它也会不断运行代码来维护环境.它不使用第三方软件或其他API.此应用程序使用的唯一外部资源是套接字连接和SQL数据库连接.它运行在64位服务器上.我尝试使用.net 2.0,3.5和4在VS2008和VS2010中进行调试.
我试过关闭编译器优化和几个微软热修复.似乎没有什么能让这个问题消失.如果有人知道任何可能的原因,或某种方式来确定导致问题的原因,将不胜感激.
我在获取visual studio 2013时遇到了麻烦.每当我为Windows Phone 8.1应用程序创建新项目时,MainPage.xaml都能正常运行,直到我重新启动或关闭我的笔记本电脑.但是,当我打开我的笔记本电脑并尝试打开现有项目时,MainPage.xaml无法加载.它说
System.Runtime.InteropServices.COMException
This app does not support the contract specified or is not installed. (Exception from HRESULT: 0x80270254)
Run Code Online (Sandbox Code Playgroud)
这是完整的错误详细信息.
System.Runtime.InteropServices.COMException
This app does not support the contract specified or is not installed. (Exception from HRESULT: 0x80270254)
at Microsoft.Expression.HostUtility.AppPackage.AppPackageNativeMethods.IApplicationActivationManager.ActivateApplication(String appUserModelId, String activationContext, ActivateOptions options, Int32& processId)
at Microsoft.Expression.HostUtility.AppPackage.WrtUtility.ActivateApplication(String appUserModelId, String activationContext, Object site)
at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.ActivateApplicationInternal(String appUserModelId, String activationContext, Object site)
at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(String applicationPath, String clientPort, Uri hostUri, IDictionary environmentVariables, Int32& processId, Object& processData)
at Microsoft.Expression.DesignHost.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory factory, IIsolationBoundary …Run Code Online (Sandbox Code Playgroud)