Exception Surface尝试从注册表获取性能计数器,但失败

Exception Surface尝试从注册表获取性能计数器,但失败,exception,touch,registry,performancecounter,surface,Exception,Touch,Registry,Performancecounter,Surface,我得到以下错误。我了解性能计数器损坏的原因以及如何修复(lodctr/r),但我无法找到导致损坏的原因,或者我如何知道surface试图找到的关键点。 它在Windows7嵌入式系统上运行 有什么想法吗 **InvokeShutdown ! There was an unhandled exception: Cannot load Counter Name data because an invalid index '' was read from the registry.** System

我得到以下错误。我了解性能计数器损坏的原因以及如何修复(lodctr/r),但我无法找到导致损坏的原因,或者我如何知道surface试图找到的关键点。 它在Windows7嵌入式系统上运行

有什么想法吗

**InvokeShutdown ! There was an unhandled exception: Cannot load Counter Name data because an invalid index '' was read from the registry.**
System
   at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp)
   at System.Diagnostics.PerformanceCounterLib.get_NameTable()
   at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
   at System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category)
   at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName)
   at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName)
   at Microsoft.Surface.PerformanceCounters..ctor()
   at Microsoft.Surface.PresentationPerformanceCounters..ctor()
   at Microsoft.Surface.PresentationPerformanceCounters.get_Instance()
   at Microsoft.Surface.Presentation.Logger.PreNotifyInput(Object sender, NotifyInputEventArgs e)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.OnSetFocus(IntPtr hwnd)
   at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Internal.WindowsBase.NativeMethodsSetLastError.SetFocus(HandleRef hWnd)
   at MS.Win32.UnsafeNativeMethods.TrySetFocus(HandleRef hWnd, IntPtr& result)
   at System.Windows.Window.ShowDialog()
   at MyAppOpenButtonClicked(Object sender, RoutedEventArgs e) in c:\MyApp\View\MainWindow.xaml.cs:line 350
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.StylusLogic.PromoteMainToMouse(StagingAreaInputItem stagingItem)
   at System.Windows.Input.StylusLogic.PromoteMainUpToTouch(StylusDevice stylusDevice, StagingAreaInputItem stagingItem)
   at System.Windows.Input.StylusLogic.PromoteMainToTouch(ProcessInputEventArgs e, StylusEventArgs stylusEventArgs)
   at System.Windows.Input.StylusLogic.PromoteMainToOther(ProcessInputEventArgs e)
   at System.Windows.Input.StylusLogic.PostProcessInput(Object sender, ProcessInputEventArgs e)
   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.StylusLogic.InputManagerProcessInput(Object oInput)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at SensibleMedical.SafeVest.Presentation.App.Main()

看来你有两个问题

第一个问题将通过命令
lodctr/r
解决(更多信息 )

在这之后,你可能会得到一些其他的stacktrace

Description: 
The application requested process termination through System.Environment.FailFast(string message). 
Message: 
Infinite recursion during resource lookup within mscorlib.  This may be a bug in mscorlib, or potentially in certain extensibility points such as assembly resolve events or CultureInfo names.  
Resource name: 
Arg_RegKeyNotFound
Stack:
        at System.Environment.FailFast(System.String) 
        at System.Environment+ResourceHelper.GetResourceStringCode(System.Object)
        at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object) 
        at System.Environment+ResourceHelper.GetResourceString(System.String, System.Globalization.CultureInfo) 
        at System.Environment.GetResourceStringLocal(System.String) 
        at System.Environment.GetResourceFromDefault(System.String) 
        at Microsoft.Win32.RegistryKey.Win32Error(Int32, System.String)
        at Microsoft.Win32.RegistryKey.InternalGetValue(System.String, System.Object, Boolean, Boolean) 
        at Microsoft.Win32.RegistryKey.GetValue(System.String)
        at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean)
        at System.Diagnostics.PerformanceCounterLib.get_NameTable()
        at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
        ...

此问题可以通过安装Microsoft®Surface®Runtime来解决

看来你有两个问题

第一个问题将通过命令
lodctr/r
解决(更多信息 )

在这之后,你可能会得到一些其他的stacktrace

Description: 
The application requested process termination through System.Environment.FailFast(string message). 
Message: 
Infinite recursion during resource lookup within mscorlib.  This may be a bug in mscorlib, or potentially in certain extensibility points such as assembly resolve events or CultureInfo names.  
Resource name: 
Arg_RegKeyNotFound
Stack:
        at System.Environment.FailFast(System.String) 
        at System.Environment+ResourceHelper.GetResourceStringCode(System.Object)
        at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object) 
        at System.Environment+ResourceHelper.GetResourceString(System.String, System.Globalization.CultureInfo) 
        at System.Environment.GetResourceStringLocal(System.String) 
        at System.Environment.GetResourceFromDefault(System.String) 
        at Microsoft.Win32.RegistryKey.Win32Error(Int32, System.String)
        at Microsoft.Win32.RegistryKey.InternalGetValue(System.String, System.Object, Boolean, Boolean) 
        at Microsoft.Win32.RegistryKey.GetValue(System.String)
        at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean)
        at System.Diagnostics.PerformanceCounterLib.get_NameTable()
        at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
        ...
此问题可以通过安装Microsoft®Surface®Runtime来解决