Search Issue Tracker

Fixed in 2017.1.X

Votes

0

Found in

2017.1.0b6

Issue ID

914830

Regression

Yes

NullReferenceException error appears when a script with AnimationCurve variable is attached to a GameObject

Animation

-

To reproduce :
1. Create project in Unity
2. Create C# script, add this line : public AnimationCurve a; in your created class
3. In hierarchy create empty GameObject and attach created script to it
4. After attaching script, select curve (GameObject->attached script and click on AnimationCurve)
5. Save scene and reopen Unity with same project
6. Notice error in console

Expected : Unity opens without any errors
Actual : Error appears.

Not reproduced with: 5.5.0f3, 5.6.0f1, 5.6.0f3, 5.6.1p1, 2017.1.0a5
Reproduced with : 2017.1.0a6, 2017.1.0b6, 2017.2.0a1
Regression introduced in : 2017.1.0a6

Note: Happens only once. Reopening project fixes issue. Doesn't depend on a layout.

Error : NullReferenceException: Object reference not set to an instance of an object
UnityEditor.CurveEditorWindow.OnDestroy () (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/CurveEditorWindow.cs:259)
UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)

Comments (5)

  1. Justlenny

    Aug 11, 2017 14:51

    just used a different controller for the object(rigidbody firstperson controller instead of the firstperson controller

  2. Justlenny

    Aug 11, 2017 14:43

    happening to me in unity 2017.1 it makes me not be able to control the camera with my mouse

  3. Alderin

    Jul 17, 2017 20:27

    Still present in 2017.1.0xf3Linux. Removed "offending" object and script from project, error still occurs on load.

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.CurveEditorWindow.OnDestroy () (at /home/builduser/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/CurveEditorWindow.cs:259)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)

  4. Martian-Games

    Jul 09, 2017 09:20

    Still present in 2017.1.0f1:
    100% reproducible upon opening any project, including a blank project.

  5. alexthomson666

    Jun 03, 2017 11:54

    This is not fixed, the issue is still in 2017.1.0b7:

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.CurveEditorWindow.OnDestroy () (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/CurveEditorWindow.cs:259)
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)

    I have removed the temp folder from my project, restarted, reset layout, done every fix I found online and it still occurs!! It is repeatable using the same steps in this issue.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.