playMaker

Author Topic: Made an FSM that crashes unity editor 100% of the time. [NO REPRO]  (Read 2200 times)

scritch

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
If i open fsm editor window with my scene open, it will crash 100% of the time.  I do not know what I did or what combination it is, because i can't load it up any more to examine it.

I have no idea how to fix it, but i'm about to lose an hour or two of work because i'm going to have to revert my file.
help?
« Last Edit: October 06, 2011, 12:43:35 PM by alexchouls »

scritch

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: Made an FSM that crashes unity editor 100% of the time.
« Reply #1 on: April 07, 2011, 05:13:59 PM »
more info.
It seems to be related to having my custom action in there
I wrote a custom action to set a particular variable on a monobehaviour component to true or false.

all it has is a variable pointing to my script type, and a bool.

sometimes if i'm dragging my object onto the component ui element in the fsm editor, it will crash horribly.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Made an FSM that crashes unity editor 100% of the time.
« Reply #2 on: April 07, 2011, 06:00:11 PM »
Can you post your custom action?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Made an FSM that crashes unity editor 100% of the time.
« Reply #3 on: April 07, 2011, 06:25:12 PM »
You probably thought of this already, but you can probably recover the scene by removing the custom action script. It will be missing from the FSM, but the rest should be intact...

scritch

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: Made an FSM that crashes unity editor 100% of the time.
« Reply #4 on: April 18, 2011, 04:34:17 PM »
I forgot to come back to this thread, sorry.
The problem was that specifying a field in my action to be filled by an object of my type derived from MonoBehaviour woudl appear to work for a while, then crash as described.

Changing this to a field of type GameObject or FsmGameObject and grabbing my object type via GetComponent<> works without incident.

I don't know if I just missed this pitfall in the docs or not, but seems like a really easy mistake to make...

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Made an FSM that crashes unity editor 100% of the time.
« Reply #5 on: April 18, 2011, 06:10:03 PM »
Thanks for the update. Still sounds like a bug... maybe the saved action data got in a bad state and was unable to recover gracefully... Where you making changes to the action when this happened? (e.g. adding/removing fields).

scritch

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: Made an FSM that crashes unity editor 100% of the time.
« Reply #6 on: April 26, 2011, 10:04:54 PM »
sorry, i don't remember the exact sequence of events any more.
But i remember it working fine for a bit, but then it would crash and the level would fail to load any more after that without crashing.  I vaguely feel like it wouldn't happen unless i had 2 of that action type somewhere in the graph, but i'm not sure about that