Closed polartron closed 6 years ago
Investigated yesterday. Turns out this is an actual bug in the logger because a log event is implemented as a struct and a field of a reference type can be used without being initialised.
Thanks for the report, we are tracking this internally as UTY-1323 👍
This will be fixed by https://github.com/spatialos/gdk-for-unity/pull/509 at least temporarily until we make improvements to how events are logged.
@polartron I'm closing this as done since https://github.com/spatialos/gdk-for-unity/pull/509 was accepted and merged.
Description
When a regular null reference exception occurs while inside a ComponentUpdated callback, the errors given by the unity console does not point towards where the nullreference exception happened.
Expected behaviour
I should be able to view the stacktrace and see in which file and on which line it happened. I should also be able to double click on the error to view in code where it happened, just like how it works normally.
Current behaviour
A nullreferenceexception outputs this and double clicking on it brings me to the LogEvent struct in the Gdk.Core
Steps to reproduce
Add the following script to the Character prefab in the Playground project. The reference test should be null.
Environment
Unity 2018.2.10f1 Personal