trulyspinach / SMCAMDProcessor

Power management, monitoring and VirtualSMC plugin for AMD processors
BSD 3-Clause "New" or "Revised" License
1.04k stars 90 forks source link

Crash on launchPowerTool when no GPU is configured #73

Closed ariejan closed 4 years ago

ariejan commented 4 years ago

Hi,

Found a nice edge case for you. I'm running a 3700X on Catalina 10.15.4. But, I'm waiting for my AMD GPU to arrive, so I'm still running with an (unsupported) nvidia card. This means VESA mode, bad performance all around, etc. Yet, it's enough to start installing some apps, like yours.

Opening AMD Power Gadget and wachting the pretty graphs works fine. But when I click the hamburger menu (launchPowerTool), causes an exception (Unexpectedly found nil while unwrapping an Optional value) in PowerToolViewController line 183.

https://github.com/trulyspinach/SMCAMDProcessor/blob/0f148338d8ab36eeb345c07bbebd138464a93c54/AMD%20Power%20Gadget/Power%20Tool/PowerToolViewController.swift#L183

So, it seems that you'd need to check for this optional value, as my system currnetly is not reporting any GPU.

As I said, I'm still in the process of setting everything up, otherwise I'd have sent you a PR ;-) Thanks for you hard work!

trulyspinach commented 4 years ago

Thanks for the feedback. #74 should fix this issue.

Sometime I am just too lazy and rush over swift code with "!"