BartoszCichecki / LenovoLegionToolkit

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

[BUG]: unexpected exception occured: Object reference not set to an instance of an object #643

Closed clav64 closed 1 year ago

clav64 commented 1 year ago

Version

2.11.2

OS

Windows 11 Education 22H2

Device

Legion S7 15ACH6

BIOS version

HACN37WW

What's wrong?

During system start up, after both shut down and restart, the lenovo legion toolkit displayes the following message:

"unexpected exception occured: Object reference not set to an instance of an object", asking me to report it here.

How to reproduce the bug?

  1. start up system
  2. Log in
  3. wait for system to load
  4. double click on lenovo legion toolkit in system tray
  5. lenovo legion toolkit displayed
  6. error appears

What is the behavior that you expected?

No error should appear. On clicking OK, the erro disappears and the program closes.

Re-opening the program from start menu does not produce the error, only occurs at system start up.

Logs

Unable to produce logs as Legion will start without error when starting in this manner.

Do you have Lenovo software installed?

Did you disable any Lenovo software using Lenovo Legion Toolkit?

Additional information

No response

BartoszCichecki commented 1 year ago

If you go to %LocalAppData%\Lenovo LegionToolkit\log are there any error logs?

DOGGOWoo commented 1 year ago

Had something similar to this error happen sometimes when I hovered over the icon to get the popup. Here is a log, maybe it helps. error_2023_03_21_18_34_57.txt

OS: Windows 10 Pro (Now using Windows 11, have yet to encounter this bug again) Device: Lenovo Ideapad 3 Gaming 15ACH6 BIOS: H3CN37WW(V2.07)

BartoszCichecki commented 1 year ago

hovered over the icon to get the popup

Just to make sure, that happens when you hover the mouse and NOT when you right click?

BartoszCichecki commented 1 year ago

@clav64 @DOGGOWoo The crash seems to be coming from deep inside WPF and I can't reproduce.

Could you please check if the build below improves the situation?

See comment below for updated build,

BartoszCichecki commented 1 year ago

LenovoLegionToolkitSetup.zip

DOGGOWoo commented 1 year ago

Well, I only had this error happen twice (according to the log files names, once on 20/3/2023 and again on 21/3/2023). Since I'm now running windows 11, I have not had this error happen again. I believe it happened when I would try to right click while the pop-up was still loading, as I primarily used the right click functionality of LegionToolkit and had not been aware of the new pop-up at the time. I don't know if that was the reason of the app crashing.

BartoszCichecki commented 1 year ago

Merging current possible fix, due to lack of responses. It doesn't break anything, it may not solve it but it's an improvement.

If issue persists in 2.12, please re-open this issue.