[NC V2.2] Crash on WP8

NodeCanvas Forums Support [NC V2.2] Crash on WP8

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #9659
    pjohalloran
    Participant

    Hi Gavalakis,

    I am experiencing a crash on WP8 platform on the latest NodeCanvas v2.2.

    When i run our game with Visual Studio attached, it reports a System.ExecutionEngineException. It doesn’t tell me where the problem is, just dies immediately. I dont have anything useful either from the player log on the device. (In any case I have emailed you this log separately in case it helps you as a bit wary of posting our games log on a public forum.)

    When i run in the Editor in WP8 platform, i get this exception:

    I don’t get that exception on any other platform in the editor on my Mac machine.

    So maybe that issue is causing the crash? Would you have any ideas on what this issue is and how this could be fixed?

    Thanks,
    PJ

    #9679
    pjohalloran
    Participant

    Was looking up posts in the forum and came across https://gist.github.com/newcommat/e4c1561b142bd6504a49 stacktrace in the http://nodecanvas.com/forums/topic/nc2-aot-error-on-startup/ post. I guess it may be the same issue possibly.

    #9678
    Gavalakis
    Keymaster

    Hello,

    Sorry for the late reply.
    Can you please put the unity inspector into Debug mode and copy paste the “Serialized Blackboard” string variable from the Blackboard component here?

    I have attached images to guide you through this.

    Thanks a lot.

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

    #9677
    pjohalloran
    Participant
    #9676
    pjohalloran
    Participant

    Do you see any issues in that Blackboard json? Maybe its a problem in my code? Or maybe an issue in NodeCanvas?

    #9675
    Gavalakis
    Keymaster

    Hello,

    Sorry for late reply.
    I dont really see any issue in there. The error shows that it tries to deserialize the base abstract type of Variable, though all serialized variables in the blackboard are of Variable which is correct.

    Do you maybe have declared in any Task, a public ‘Variable’ type field?

    Thanks.

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

    #9674
    pjohalloran
    Participant

    Me too, sorry for late replies. I am a little busy on other topics in work this week. Thank you for help though.

    No, in my custom tasks i have no public Variable type fields, just BBParamter<T> in a few tasks. I dont even work with Variables directly in any of the tasks. I just modify them via the Blackboard with GetValue and SetValue.

    Is there anything else that could do it?

    #9673
    pjohalloran
    Participant

    The Variable class is abstract so i tried making it not abstract and declaring all abstract members as virtual.
    [Will post my Variable class changes here or can send via email if you are interested…]

    This stopped the “Cannot create an instance of an interface or abstract type for NodeCanvas.Framework.Variable” exception in the editor.

    I still get a crash when running the game on WP8 though.
    “System.ExecutionEngineException was unhandled
    Message: An unhandled exception of type ‘System.ExecutionEngineException’ occurred in Unknown Module.”

    Thats all the info i have from Visual Studio i’m afraid.

    Im going to try turning off parts of my BT to see if something i am doing is causing the crash. But any thoughts or advice in the meantime would be appreciated. Thanks.

    #9672
    pjohalloran
    Participant

    I’ve just done a bare minimal BT graph with a root node and 1 node that Waits for 0.5 seconds and continues. I still get the crash on WP8 when the game starts and the BT is initialized.

    #9671
    pjohalloran
    Participant

    Ok, I tried a few more things to narrow this down.

    – I removed all nodes from my BT and tried. Crash.

    – I removed all Variables from my blackboard and retried. Crash. (So Blackboard json is “{“_name”:null,”_variables”:{}}”)

    – I disabled the BTOwner component and tried. Crash.

    – I disabled the GameObject where my BTOwner and Blackboard component are on. Crash.

    – I removed the BTOwner component, leaving only the Blackboard component and reenabled the GameObject. Crash.

    I set breakpoints in Blackboard component and followed the code through. Starting in Blackboard.OnAfterDeserialize through to the function fsMetaType.CreateInstance for the type “NodeCanvas.Framework.Internal.BlackboardSource”.

    The ExecutionEngineException occurs on line 293 of the fsMetaType class in the code:

    #9670
    pjohalloran
    Participant

    Using the version of Activator.CreateInstance with just a Type parameter on the GameObject with just a Blackboard componenent attached does not crash on WP8.

    Activator.CreateInstance(ReflectedType);

    Can we pass along this feedback to the FullSerializer maintainer?

    Am trying out now my full BT with the fix.

    #9669
    Gavalakis
    Keymaster

    Hey!

    Sorry for late reply once more ๐Ÿ™‚

    Thanks a lot for looking into this. I am also trying to figure the WP8/WSA issue as well. It seems that Jacob (full serializer) has made a couple of updates to his source code as well. Some seems WinRT relevant too. I will update to the latest version and include in the next update. I will get in contact with Jacob regarding Activator.CreateInstance. Please let me know if this works correctly for you on the platform.

    Speaking of next update, I also created a class generator utility for AOT “limitation” with generics. It creates a declaration for all generic Tasks (as well as BBParameters and Variables) for the most common value types, so there would be no problems with that on iOS as well. Furthermore I will include a new set of Script Control Tasks that work on all platforms and fixes for Bound variables and FSM callbacks for iOS.

    I realy hope that with this update ( and with your help on WP8 ๐Ÿ™‚ ) NC will once again be multiplatform.

    I will be glad to know if WP8 works out for you based on your latest find.
    Meanwhile I will contact Jacob.
    Thanks a lot again.

    Cheers!
    Gavalakis Vaggelis

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

    #9668
    pjohalloran
    Participant

    So yes, with my full BT, and the fix, i don’t get a crash anymore on WP8. So yay, thats fix is good.

    Latest issue now on WP8 is that my BT takes 1 minute+ to deserialize it seems. My BT exported to json is 9000 lines+ so is complex. But on other platforms it doesnt take anywhere near this time (a few seconds, maybe).

    Do you have any advice for what could be taking so long here? Or what i could do to help you?

    #9667
    pjohalloran
    Participant

    Speaking of next update, I also created a class generator utility for AOT โ€œlimitationโ€ with generics. It creates a declaration for all generic Tasks (as well as BBParameters and Variables) for the most common value types, so there would be no problems with that on iOS as well. Furthermore I will include a new set of Script Control Tasks that work on all platforms and fixes for Bound variables and FSM callbacks for iOS.

    BTW, thats great. ๐Ÿ™‚

    #9666
    Gavalakis
    Keymaster

    Hey,

    Thats great news. I will inform Jacob about this and he might have some advice on the matter. Thanks a lot for letting me know and your time ๐Ÿ™‚
    Regarding that rather long deserialization time in WP8, I have some idea in mind.
    Could you please open up Node.cs and Task.cs and comment out temporary the attribute on the class:
    [fsObject(Processor = typeof(fsNodeProcessor)] and…
    [fsObject(Processor = typeof(fsTaskProcessor)]
    ?

    Due to how types can be (or rather can’t nicely be) looked up in WP8, these processors might very well slow deserialization quite a bit in WP8. Also their purpose is purely for Missing Nodes, Tasks and recovery, thus I will make them UNITY_EDITOR only for the next update in any case.

    Thanks again!

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

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