2016-09-11 1 views
1

Я получаю следующую ошибку. Я понял, что счетчики производительности повреждены и как их исправить (lodctr/r), но я не мог понять причину, по которой это произошло, или как я узнаю, к какому ключу пытается найти поверхность. Он работает на Windows 7 встраивается.Поверхность пытается получить счетчик производительности из реестра и не работает

любые идеи?

**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() 

ответ

0

Кажется, у вас есть две проблемы

Первый из них будет решена с помощью команды lodctr /r (подробнее Cannot load Counter Name data because an invalid index -Exception)

После этого вы можете получить некоторые другие 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.

Смежные вопросы