reagcz / IdeapadToolkit

A lightweight Lenovo Vantage alternative for the Ideapad Flex 5
MIT License
33 stars 2 forks source link

App launch crash #3

Closed mikaisfake closed 1 year ago

mikaisfake commented 1 year ago

Issue: App launches and crashes. a window pops up with home ui and crashes/auto closes after a few seconds, app in taskbar menu also closes instantly.

device: Lenovo Flex 5 (ryzen) 14ALC05 system: windows 11 22H2 notes: all requirements are installed, along with the specified powerbattery.dll shared in another issue, fresh windows install. 2zDeESH2BG

reagcz commented 1 year ago

Hi, can you please try with the version linked below? It should now produce a log file

IdeapadToolkit.zip

mikaisfake commented 1 year ago

Hi, I ran the tool, it started its process and didn't crash unlike the Oct 5 version although this log was outputted i do have powerbattery.dll in the same folder

2022-11-18 08:20:14.613 +05:30 [ERR] Error while getting Always on usb setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBCharger(CUSBCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbEnabled() 2022-11-18 08:20:14.638 +05:30 [ERR] Error while getting Always on usb setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBCharger(CUSBCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbEnabled() 2022-11-18 08:20:14.641 +05:30 [ERR] Error while getting Always on usb battery setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBBatteryCharger(CUSBBatteryCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbBatteryEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbBatteryEnabled() 2022-11-18 08:20:14.658 +05:30 [ERR] Error while getting Always on usb setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBCharger(CUSBCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbEnabled() 2022-11-18 08:20:14.662 +05:30 [ERR] Error while getting Always on usb setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBCharger(CUSBCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbEnabled() 2022-11-18 08:20:14.664 +05:30 [ERR] Error while getting Always on usb battery setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBBatteryCharger(CUSBBatteryCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbBatteryEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbBatteryEnabled() 2022-11-18 08:20:15.171 +05:30 [ERR] Exception while fetching current settings System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CIntelligentCooling(CIntelligentCooling& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.GetPowerPlan() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.Refresh() 2022-11-18 08:21:45.450 +05:30 [ERR] Exception while fetching current settings System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CIntelligentCooling(CIntelligentCooling& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.GetPowerPlan() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.Refresh() 2022-11-18 08:21:48.061 +05:30 [ERR] Error while getting Always on usb setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBCharger(CUSBCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbEnabled() 2022-11-18 08:21:48.064 +05:30 [ERR] Error while getting Always on usb setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBCharger(CUSBCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbEnabled() 2022-11-18 08:21:48.067 +05:30 [ERR] Error while getting Always on usb battery setting System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CUSBBatteryCharger(CUSBBatteryCharger& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.IsAlwaysOnUsbBatteryEnabled() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.get_IsAlwaysOnUsbBatteryEnabled() 2022-11-18 08:21:48.243 +05:30 [ERR] Exception while fetching current settings System.DllNotFoundException: Unable to load DLL 'PowerBattery.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at IdeapadToolkit.Services.LenovoPowerSettingsService.CIntelligentCooling(CIntelligentCooling& var1) at IdeapadToolkit.Services.LenovoPowerSettingsService.GetPowerPlan() at IdeapadToolkit.ViewModels.LenovoSettingsViewModel.Refresh()

reagcz commented 1 year ago

You mentioned you have a fresh windows install. Please try installing the x86 and x64 Visual C++ redistributables from here https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170. The correct version should be in the table below "Visual Studio 2015, 2017, 2019, and 2022"

mikaisfake commented 1 year ago

Thank you, that seems to have fixed it, works flawlessly now.

reagcz commented 1 year ago

No problem, I'll add this to the README.