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 exceptions in debugger extension #2057

Merged
merged 13 commits into from
Apr 13, 2021

Conversation

citizenmatt
Copy link
Member

This PR handles a number of exceptions generated while evaluating extra data such as "Active Scene", "this.gameObject", "Scene Path" and so on.

  • Catches exceptions thrown by evaluated code and recovers gracefully. Retrieves the messages of various expected exceptions and silently logs at verbose level. Unexpected exceptions are reported at error level, to allow reporting and fixing
  • Silently logs EvaluatorAbortedException rather than log as error. This is a process control exception and shouldn't be logged. Fixes DEXP-570625
  • Catches UnityException thrown when evaluating API calls at invalid moments, e.g. calling GetActiveScene in a MonoBehaviour constructor. This could break evaluation of an entire Unity Object. Exception is caught and silently logged at verbose. Fixes RIDER-60794 and RIDER-60795
  • Catches MissingComponentException and silently logs. Thrown by "null" instances returned from GetComponent when there isn't a Component attached to the current GameObject. Fixes DEXP-585430
  • Catches MissingReferenceException and silently logs. Thrown by calling APIs from destroyed objects. Fixes DEXP-534612
  • Catches UnassignedReferenceException and silently logs. Thrown by "null" instance objects created for an unassigned serialised field. Fixes DEXP-558487
  • Prevent exceptions when implicit evaluation is disabled. Unity extensions are evaluated even if implicit eval is disabled, as there is a separate setting to disable them. Fixes RIDER-60798
  • Gracefully handle possible null references while retrieving "Scene Path". Fixes DEXP-561412
  • Handle null reference when showing debugger display string details for mesh components. Fixes DEXP-577753

Fixes RIDER-60794, Fixes RIDER-60795
* MissingComponentException - thrown by "null" instance objects returned from GetComponent for a Component that isn't attached to the current GameObject. Fixes DEXP-585430
* MissingReferenceException - thrown by destroyed objects. Fixes DEXP-534612
* UnassignedReferenceException - thrown by "null" instance objects in a serialised field that has never been assigned. Fixes DEXP-558487
@citizenmatt citizenmatt self-assigned this Apr 6, 2021
@citizenmatt citizenmatt added this to the Rider 2021.1.1 milestone Apr 6, 2021
@krasnotsvetov krasnotsvetov self-requested a review April 12, 2021 16:32
@citizenmatt citizenmatt merged commit c34de7f into net211 Apr 13, 2021
@citizenmatt citizenmatt deleted the net211-mte-debug-renderer-exceptions branch April 13, 2021 14:25
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.

None yet

2 participants