应用程序崩溃尝试读取或写入受保护的内存

时间:2018-01-24 08:29:21

标签: c# exception memory protected unhandled

请有人告诉我下面可能导致此错误的原因:

  

未处理的异常:System.AccessViolationException:尝试读取或写入受保护的内存。这通常表明其他内存已损坏。          在System.String.wcslen(Char * ptr)          在System.String.CtorCharPtr(Char * ptr)          在System.Runtime.InteropServices.Marshal.PtrToStringUni(IntPtr ptr)          在Microsoft.Win32.SystemEvents.GetUserPreferenceCategory(Int32 msg,IntPtr wParam,IntPtr lParam)          在Microsoft.Win32.SystemEvents.OnUserPreferenceChanging(Int32 msg,IntPtr wParam,IntPtr lParam)          在Microsoft.Win32.SystemEvents.WindowProc(IntPtr hWnd,Int32 msg,IntPtr wParam,IntPtr lParam)          在System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)          在System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID,Int32 reason,Int32 pvLoopData)          在System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason,ApplicationContext context)          在System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,ApplicationContext context)          在My.Program.Main(String [] args)

应用程序:My.exe(C#) 框架版本:v4.0.30319 安装.Net Framework:4.5.2

0 个答案:

没有答案