Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null Reference when initialising MSI SDK #175

Closed
Riccorbypro opened this issue Feb 15, 2021 · 5 comments
Closed

Null Reference when initialising MSI SDK #175

Riccorbypro opened this issue Feb 15, 2021 · 5 comments

Comments

@Riccorbypro
Copy link

This issue may be similar to #37. I originally encountered this when trying to sync my GPU (ROG Strix 3070) and Motherboard (MSI X570-A Pro) in Artemis, and when enabling the Mystic Light plugin it threw a Null Reference error which was in RGB.NET.

I have run the MsiSDKTest solution on my PC and got the following output:

Starting ...
Initialized! (ErrorCode: -3)
Exception:
Object reference not set to an instance of an object.

It's worth noting that Mystic Light does work in Dragon Center, and I have tried running both with Dragon Center running and closed. Additionally, I tried without LEDKeeper2 running, this is MSI's program that keeps your lighting set without Dragon Center open.

Please let me know if you need any other info from me. I will be posting and linking to this issue in Artemis's issues as well.

@DarthAffe
Copy link
Owner

The SDK-docs list -3 as:

MLAPI_NO_IMPLEMENTED = -3
Description: MSI application not found or installed version not supported.

I just checked the msi page and there is a newer sdk available -> hopefully it's just the sdk not compatible with a current dragon center.
Could you try to run the test-application with the new sdk-dll? (http://download.msi.com/uti_exe/Mystic_light_SDK.zip)
It might not work at all due to changes to the api, but its worth a try. I'll look into updating the packages once we know if it works or if not what the error is.

@Riccorbypro
Copy link
Author

So running the test app with the new DLL initialises successfully (I assume since that's usually what code 0 means), but it still gets that NullReferenceException afterwards when trying to get the device info (L19 in the test app).

For some reason GetDeviceInfo() is coming back as result -2 and returning ledCount as null.
image

Do you have a link to the documentation for the MSI SDK? A few minutes of googling has only managed to link me back to either reddit posts about how bad it is and a few projects here and there trying to use it, but no actual docs from MSI,

@DarthAffe
Copy link
Owner

https://storage-asset.msi.com/files/pdf/Mystic_Light_Software_Development_Kit.pdf
(at the bottom of https://de.msi.com/Landing/mystic-light-rgb-gaming-pc/download)
-2 is timeout, we had this quite a lot in the past. It might help to run it as admin.

@Riccorbypro
Copy link
Author

OK so running as admin with the new SDK DLLs works (albeit there's no change to RGB because I only have JRAINBOW1 and 2 plugged in, not JRGB1 which is what gets changed). Does this mean that the version of RGB.NET that Artemis uses needs to be updates, and that Artemis needs to be run as admin?

@DarthAffe
Copy link
Owner

  1. Yes I'll update the SDK - Artemis will get it automatically once that's done.
  2. Most likely yes; Artemis can enforce running as admin if a specific module is loaded though (@SpoinkyNL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants