Skip to content

Application Error: System.TypeInitializationException in LenovoLegionToolkit #1583

Closed
@anuragsgupta

Description

@anuragsgupta

Version

2.25.1

OS

Windows 11 23H2 build 22631.4890

Device

Lenovo Ideapad Gaming 3 15ACH6

BIOS version

LENOVO H3CN39WW(V2.09), 31-05-2023

What is wrong?

When launching Lenovo Legion Toolkit, an "Application Error" popup appears with the following message:

Unexpected exception occurred:
System.TypeInitializationException: The type initializer for 'Microsoft.Win32.TaskScheduler.TaskService' threw an exception.
at TaskService
Microsoft.Win32.TaskScheduler.TaskService.get_Instance()
at LenovoLegionToolkit.Lib.System.Autorun.Validate()
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.Runtime.InteropServices.COMException: The request is not supported. (0x80070032)

What did you try already?

It seems like the issue is related to the Windows Task Scheduler API not initializing correctly, causing the app to crash.

What did you try already?

Restarted the Lenovo Legion Toolkit.
Verified that Task Scheduler is running by checking "services.msc".
Ran Lenovo Legion Toolkit with administrator privileges.
Reinstalled the Lenovo Legion Toolkit.
Ensured Windows 11 is up to date.

How to reproduce the bug?

  1. Launch Lenovo Legion Toolkit.
  2. The application immediately throws an "Application Error" popup with the above exception trace.

What is the behavior that you expected?

The Lenovo Legion Toolkit should start without any errors and allow me to manage system settings.

Logs

(Attach logs following the README instructions)

Additional information

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions