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

fix: handle null or empty named message registration [MTT-7771] #2807

Merged

Conversation

NoelStephensUnity
Copy link
Collaborator

This catches the case where trying to register or "unregister" a null or empty string will log an error and not throw an exception.
This also resolves the issue on the NetworkTransform side where, under certain conditions, it was possible for NetworkTransform to attempt to "unregister" its named message before it had been assigned.

MTT-7771

fix: #2772

Changelog

  • Changed: CustomMessageManager will no longer attempt to register or "unregister" a null or empty string and will log an error if this condition occurs.
  • Fixed: Issue where NetworkTransform could potentially attempt to "unregister" a named message prior to it being registered.

Testing and Documentation

  • Includes unit test.
  • No documentation changes or additions were necessary.

Fixes issue where registering or unregistering named message that is null or empty does not throw an exception.
Fixes issue where it was possible that NetworkTransform could try to unregister a named message before it had been assigned a value.
Actually decided to make both cases log an error and raised the minimum loglevel.
Adding a test to verify that trying to register or unregister a null or empty named message will not throw an exception.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review January 12, 2024 22:33
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner January 12, 2024 22:33
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) January 12, 2024 22:34
@NoelStephensUnity NoelStephensUnity merged commit 64ed674 into develop Jan 13, 2024
23 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/handle-null-or-empty-named-message-mtt-7771 branch January 13, 2024 01:58
@zachstronaut
Copy link

Is it correct that this fix is not part of the 1.8.0 release?

@NoelStephensUnity
Copy link
Collaborator Author

That is correct. v1.8.0 was delayed a bit so there could be some catch up on the documentation.
The next update will contain this fix.

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

Successfully merging this pull request may close these issues.

ArgumentNullException in NetworkTransform when destroying a scene with disabled NetworkTransform GameObjects
3 participants