BartoszCichecki / LenovoLegionToolkit

Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
GNU General Public License v3.0
4.54k stars 220 forks source link

Application Error on L7 16ACHG6 #966

Closed tuanlda closed 9 months ago

tuanlda commented 9 months ago

Rules

Version

2.16.2

OS

Windows 11 Pro 22H2 build 22621.1702

Device

Legion 7 16ACHG6

BIOS version

GKCN59WW

What's wrong?

The application doesn't open. It was working normally before. Application, required drivers reinstallation do not help.

After reinstalling Windows, it worked fine for sometime, but stopped working again with the same error.

Restoring Windows from last known good backup image doesn't help.

Here are the error dialogs from Window:

The first error dialog:


Application Error

Unexpected exception occurred:

System.Management.ManagementException: Call failed: Invalid object . [scope=root\WMI, query=SELECT * FROM LENOVO_GAMEZONE_DATA, methodName=GetSmartFanMode]

at async Task LenovoLegionToolkit.Lib.System.Management.WMI.CallAsync(string scope, FormattableString query, string methodName, Dictionary<string, object> methodParams, Func<PropertyDataCollection, T> converter)

at async Task LenovoLegionToolkit.Lib.Features.AbstractWmiFeature.GetStateAsync()

at async Task LenovoLegionToolkit.Lib.Controllers.AIController.ShouldDisableAsync()

at async Task LenovoLegionToolkit.Lib.Controllers.AIController.StopAsync()

at async Task LenovoLegionToolkit.Lib.Controllers.AIController.StartIfNeededAsync()

at async void LenovoLegionToolkit.WPF.App.Application_Startup(object sender, StartupEventArgs e)

at void System.Threading.Tasks.Task.ThrowAsync(Exception exception, SynchronizationContext targetContext)+(object state) => { }

at object System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, object args, int numArgs)

at object System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, Delegate callback, object args, int numArgs, Delegate catchHandler) ---> System.Management.ManagementException: Invalid object

at void System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)

at ManagementBaseObject System.Management.ManagementObject.InvokeMethod(string methodName, ManagementBaseObject inParameters, InvokeMethodOptions options)

at async Task LenovoLegionToolkit.Lib.System.Management.WMI.CallAsync(string scope, FormattableString query, string methodName, Dictionary<string, object> methodParams, Func<PropertyDataCollection, T> converter)

--- End of inner exception stack trace ---

Please report the issue on https://github.com/BartoszCichecki/LenovoLegionToolkit.

OK

The second error dialog:


Application Domain Error

Unexpected exception occurred:

System.Management.ManagementException: Call failed: Invalid object . [scope=root\WMI, query=SELECT * FROM LENOVO_GAMEZONE_DATA, methodName=GetSmartFanMode]

at async Task LenovoLegionToolkit.Lib.System.Management.WMI.CallAsync(string scope, FormattableString query, string methodName, Dictionary<string, object> methodParams, Func<PropertyDataCollection, T> converter)

at async Task LenovoLegionToolkit.Lib.Features.AbstractWmiFeature.GetStateAsync()

at async Task LenovoLegionToolkit.Lib.Controllers.AIController.ShouldDisableAsync()

at async Task LenovoLegionToolkit.Lib.Controllers.AIController.StopAsync()

at async Task LenovoLegionToolkit.Lib.Controllers.AIController.StartIfNeededAsync()

at async void LenovoLegionToolkit.WPF.App.Application_Startup(object sender, StartupEventArgs e)

at void System.Threading.Tasks.Task.ThrowAsync(Exception exception, SynchronizationContext targetContext)+(object state) => { }

at object System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, object args, int numArgs)

at object System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, Delegate callback, object args, int numArgs, Delegate catchHandler)

at void System.Windows.Threading.DispatcherOperation.InvokeImpl()

at void System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)

at void MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj)

at void MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, object state)

at void System.Windows.Threading.DispatcherOperation.Invoke()

at void System.Windows.Threading.Dispatcher.ProcessQueue()

at IntPtr System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)

at IntPtr MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)

at object MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)

at object System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, object args, int numArgs)

at object System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, Delegate callback, object args, int numArgs, Delegate catchHandler)

at object System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, object args, int numArgs)

at IntPtr MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam)

at IntPtr MS.Win32.UnsafeNativeMethods.DispatchMessage(in MSG msg)

at void System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

at void System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

at void System.Windows.Threading.Dispatcher.Run()

at object System.Windows.Application.RunDispatcher(object ignore)

at int System.Windows.Application.RunInternal(Window window)

at int System.Windows.Application.Run()

at void LenovoLegionToolkit.WPF.App.Main() ---> System.Management.ManagementException: Invalid object

at void System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)

at ManagementBaseObject System.Management.ManagementObject.InvokeMethod(string methodName, ManagementBaseObject inParameters, InvokeMethodOptions options)

at async Task LenovoLegionToolkit.Lib.System.Management.WMI.CallAsync(string scope, FormattableString query, string methodName, Dictionary<string, object> methodParams, Func<PropertyDataCollection, T> converter)

--- End of inner exception stack trace ---

Please report the issue on https://github.com/BartoszCichecki/LenovoLegionToolkit.

OK

How to reproduce the bug?

  1. Open application
  2. See error.

What is the behavior that you expected?

Application opened

Logs

log_2023_09_13_14_21_57.txt

Additional information

No response

BartoszCichecki commented 9 months ago

Invalid object . [scope=root\WMI, query=SELECT * FROM LENOVO_GAMEZONE_DATA, methodName=GetSmartFanMode]

This error indicates that Lenovo's WMI functions are either not available or broken. You can try reinstalling Lenovo Vantage Gaming Feature driver, but if it doesn't help I can't fix it, since that is a problem with your Windows installation.