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

Game crash on faulty Custom Counter #116

Open
ChirpyMisha opened this issue Jan 15, 2022 · 0 comments
Open

Game crash on faulty Custom Counter #116

ChirpyMisha opened this issue Jan 15, 2022 · 0 comments

Comments

@ChirpyMisha
Copy link

It's up to debate whether this is an issue with the mod or not.
Anyway, when the "CounterLocation", "Resource", or "Host" paths contain a typo in the manifest.json of a custom counter, then Counters+ will crash. To me the error messages are a bit vague (see below). Possibly adding the custom counter in a try-catch or checking if the path is correct can give a much more informative log message and then the custom counter can be ignored.

I made a small change in one of my counters while working on another counter, and I thought I somehow caused an incompatibility conflict or something like that. In the end I forgot that I changed the namespace of my counter and didn't update it in the manifest file. So I spent a lot of time looking for a fix in the wrong counter.
Of course it's my fault for making the mistake. I can't deny that. But imho I think Counters+ should be able to handle those exceptions 😅

Example of the first 3 error messages:
[CRITICAL @ 15:20:30 | UnityEngine] NullReferenceException: Object reference not set to an instance of an object
[CRITICAL @ 15:20:30 | UnityEngine] CountersPlus.Installers.CountersInstaller.AddCustomCounter (CountersPlus.Custom.CustomCounter customCounter, System.Type counterType) (at :0)
[CRITICAL @ 15:20:30 | UnityEngine] CountersPlus.Installers.CountersInstaller.InstallBindings () (at :0)

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

1 participant