Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Conversation

@ThomasAunvik
Copy link

@ThomasAunvik ThomasAunvik commented May 19, 2018

Fixes #787

This fixes the NullReferenceException you get, probably cause i dont have any locks.

NullReferenceException: Object reference not set to an instance of an object
GitHub.Unity.ChangesView.<BuildTree>b__42_0 (GitStatusEntry entry)
System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[GitHub.Unity.GitStatusEntry,GitHub.Unity.GitStatusEntryTreeData].MoveNext ()
GitHub.Unity.TreeBase`2[GitHub.Unity.ChangesTreeNode,GitHub.Unity.GitStatusEntryTreeData].Load (IEnumerable`1 treeDatas)
GitHub.Unity.ChangesView.BuildTree ()
GitHub.Unity.ChangesView.MaybeUpdateData ()
GitHub.Unity.ChangesView.OnDataUpdate ()
GitHub.Unity.Window.SwitchView (GitHub.Unity.Subview fromView, GitHub.Unity.Subview toView)
GitHub.Unity.Window.UpdateActiveTab ()
GitHub.Unity.Window.DoToolbarGUI ()
GitHub.Unity.Window.OnUI ()
GitHub.Unity.BaseWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:291)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:284)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:251)```

@StanleyGoldman
Copy link
Contributor

hey @ThomasAunvik
We usually default the fields for views directly.
I pushed to your branch, test it out if you get a chance.

@StanleyGoldman
Copy link
Contributor

You know, I'm not able to reproduce the crash that you are getting here.

@ThomasAunvik
Copy link
Author

Crash? Its just an error, and that makes me unable to see the changes.

I managed to reproduce it by just going to master branch, and open unity after i built it, must close after build.

Copy link
Member

@shana shana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've repro'd the exception and validated the fix 👍

@shana shana merged commit cd1d63f into github-for-unity:master May 23, 2018
@ThomasAunvik ThomasAunvik deleted the origin/fixes/gitLocksNull branch May 23, 2018 14:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changes view fails with an exception

3 participants