Issue with 'fresh' FSM

NodeCanvas Forums Support Issue with 'fresh' FSM

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9843

    All of a sudden a FSM i added to a gameobject in my scene is going nuts throwing exceptions every frame. I have already removed the complete FSM to rebuild from scratch, but still it gives me errors. I’ve also updated to the latest version to no avail.

    The exception i’m getting is :

    NullReferenceException: Object reference not set to an instance of an object
    NodeCanvas.StateMachines.FSM.OnGraphUpdate () (at Assets/NodeCanvas/Systems/FSM/FSM.cs:49)
    NodeCanvas.MonoManager.Update () (at Assets/NodeCanvas/Core/Other/MonoManager.cs:58)

    It appears that the ‘currentState’ object is null.

    Any clue on what could be going on here?

    Regards,
    Arie van Someren

    #9849
    Gavalakis
    Keymaster

    Hello,

    Hmm. Is there any state marked as “Start” in the FSM?
    Also, do you get any other log apart from the exceptions?

    Thanks

    Join us on Discord: https://discord.gg/97q2Rjh

    #9848

    Thanks for the reply…

    After fiddling around, at some point it started working again. I removed the involved gameobjects and FSM stuff. After reapplying it all, for some reason it ran like a charm again.

    Thnx for the hint!

    #9847

    Recently I got the same error. Fortunately it was only a test project. Because this error broke the entire project!

    I even could reproduce this error. In my case, I only had to delete the camera game object. Than the exact same error accord. I created a new camera. Didn’t fix the problem. I created a new scene file, with new game objects. It was fine until I only had to create a new FSM. And the same error appeared again. I deleted the entire “Library” folder because I thought some information is broken. But this didn’t help either. I wonder where else Unity may store information. Because obviously something is saved. Is it serialization somewhere else on my drive?

    #9846

    Trying to understand this problem. I just looked up again the “broken” project. And at least in my case, this was indeed the cause. I only added an FSM as a place holder, and of course didn’t add any nodes at all. So, no Start node as well. 😀

    You might want to consider to add a more informative error message, Gavalakis. I tried to add an Any State and an Concurrent node, without a Start node of course, and the error showed up again. There is always a Start node required? If so, you might really want to catch this exception and inform the user. Since I could see that one may think, that an Any State or Concurrent node is something that should get the FSM running as well. But it seems it doesn’t.

    #9845
    Gavalakis
    Keymaster

    Yep indeed,

    Such a check was there some time ago and removed for some reason I can’t remember right now 🙂
    I’ve just added it in again for the upcomming version 2 so that a log will show up.

    Cheers and thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #9844

    Thnx SouldomainTM for the heads up. I really thought i was losing my mind 😉

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.