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

I just updated to 2.2.1 and now I'm see a NullReferenceException error on launch in Unity Editor (Windows) #1846

Closed
lcnvdl opened this issue Oct 15, 2024 · 3 comments
Labels
Bug Something isn't working Editor

Comments

@lcnvdl
Copy link

lcnvdl commented Oct 15, 2024

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which version of the SDK?
2.2.1

How did you install the package? (Git-URL, Assetstore)
Git-URL

Which version of Unity?
2021.3.34f1

Is this happening in Unity (editor) or on a player like Android, iOS, Windows?
Windows

Steps to Reproduce

  1. Hit "play" in my project.

Actual Result

I'm getting an error in Unity console. I had my version 2.2.0, but because of the known issue #1841 (comment) I decided to upgrade it to 2.2.1.

This is the error in 2.2.1:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.PropertyEditor.DrawEditors (UnityEditor.Editor[] editors) (at <0a81bd77f3334bdfa5d31008229edcac>:0)
UnityEditor.PropertyEditor.RebuildContentsContainers () (at <0a81bd77f3334bdfa5d31008229edcac>:0)
UnityEditor.InspectorWindow.RedrawFromNative () (at <0a81bd77f3334bdfa5d31008229edcac>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
Sentry.Unity.Integrations.UnityLogHandlerIntegration:LogException(Exception, Object) (at /sentry-unity/src/Sentry.Unity/Integrations/UnityLogHandlerIntegration.cs:63)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

It happens every time I start my project in Unity Editor.

Image

@bitsandfoxes
Copy link
Contributor

Hey @lcnvdl, sorry to see you run into issues. I've tried ever which way to reproduce this in a fresh project but fail to do so.
I'm not even sure this is caused by the SDK. The SDK's loghandler integration is part of the callstack because it forwards the logs.
A workaround/fix that comes to mind is to delete and recreate the Library folder inside your project.

@bitsandfoxes bitsandfoxes added Bug Something isn't working Editor labels Oct 16, 2024
@lcnvdl
Copy link
Author

lcnvdl commented Oct 16, 2024

Hey @lcnvdl, sorry to see you run into issues. I've tried ever which way to reproduce this in a fresh project but fail to do so. I'm not even sure this is caused by the SDK. The SDK's loghandler integration is part of the callstack because it forwards the logs. A workaround/fix that comes to mind is to delete and recreate the Library folder inside your project.

Thanks for your answer.

This happened exactly when I upgraded Sentry.

Yesterday I deleted Library folder, re-open my project, and that solved the problem.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Oct 16, 2024
@bitsandfoxes
Copy link
Contributor

bitsandfoxes commented Oct 17, 2024

Thanks for the update and glad you got it resolved!
We'll look into better supporting the upgrade process as part of #1847

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Editor
Projects
Status: Done
Archived in project
Development

No branches or pull requests

2 participants