Search Unity

Serialization Error : System.InvalidOperationException: Internal Deserialization Error - Object def

Discussion in 'Visual Scripting' started by morphex, Nov 25, 2020.

  1. morphex

    morphex

    Joined:
    Dec 18, 2012
    Posts:
    112
    Working on a graph, whenever I reference the "Self Node", or anything that references the current gameObject throws me that error.

    This is the JSON output of the log, also the error only occurs at runtime.


    Code (JavaScript):
    1. JSON:
    2. {
    3.     "graph": {
    4.         "title": null,
    5.         "summary": null,
    6.         "pan": {
    7.             "x": -262.0,
    8.             "y": -4.0
    9.         },
    10.         "zoom": 1.0,
    11.         "elements": [
    12.             {
    13.                 "nest": {
    14.                     "source": "Embed",
    15.                     "macro": null,
    16.                     "embed": {
    17.                         "variables": {
    18.                             "collection": {
    19.                                 "$content": [],
    20.                                 "$version": "A"
    21.                             },
    22.                             "$version": "A"
    23.                         },
    24.                         "controlInputDefinitions": [],
    25.                         "controlOutputDefinitions": [],
    26.                         "valueInputDefinitions": [],
    27.                         "valueOutputDefinitions": [],
    28.                         "title": "Aerial",
    29.                         "summary": null,
    30.                         "pan": {
    31.                             "x": -462.0,
    32.                             "y": -79.0
    33.                         },
    34.                         "zoom": 1.0,
    35.                         "elements": [
    36.                             {
    37.                                 "StateType": {
    38.                                     "StateType": "ExampleProject.Character.State.AerialState"
    39.                                 },
    40.                                 "defaultValues": {
    41.  
    42.                                 },
    43.                                 "position": {
    44.                                     "x": -631.0,
    45.                                     "y": -451.0
    46.                                 },
    47.                                 "guid": "7cf6e3f2-bccc-4305-a15b-c675e3895943",
    48.                                 "$version": "A",
    49.                                 "$type": "ExampleProjectStateHandler"
    50.                             }
    51.                         ],
    52.                         "$version": "A"
    53.                     }
    54.                 },
    55.                 "isStart": true,
    56.                 "position": {
    57.                     "x": -722.0,
    58.                     "y": -401.0
    59.                 },
    60.                 "width": 170.0,
    61.                 "guid": "ce87afa6-42a4-4ac5-841e-c4dfedf59908",
    62.                 "$version": "A",
    63.                 "$type": "Bolt.FlowState",
    64.                 "$id": "3"
    65.             },
    66.             {
    67.                 "nest": {
    68.                     "source": "Embed",
    69.                     "macro": null,
    70.                     "embed": {
    71.                         "variables": {
    72.                             "collection": {
    73.                                 "$content": [],
    74.                                 "$version": "A"
    75.                             },
    76.                             "$version": "A"
    77.                         },
    78.                         "controlInputDefinitions": [],
    79.                         "controlOutputDefinitions": [],
    80.                         "valueInputDefinitions": [],
    81.                         "valueOutputDefinitions": [],
    82.                         "title": "GroundState",
    83.                         "summary": null,
    84.                         "pan": {
    85.                             "x": 0.0,
    86.                             "y": 0.0
    87.                         },
    88.                         "zoom": 1.0,
    89.                         "elements": [
    90.                             {
    91.                                 "StateType": {
    92.                                     "StateType": "ExampleProject.Character.State.GroundState"
    93.                                 },
    94.                                 "defaultValues": {
    95.  
    96.                                 },
    97.                                 "position": {
    98.                                     "x": -114.0,
    99.                                     "y": -213.0
    100.                                 },
    101.                                 "guid": "ec3e24e5-bd9f-4511-9c3d-376753cbe77f",
    102.                                 "$version": "A",
    103.                                 "$type": "ExampleProjectStateHandler"
    104.                             }
    105.                         ],
    106.                         "$version": "A"
    107.                     }
    108.                 },
    109.                 "isStart": false,
    110.                 "position": {
    111.                     "x": -347.0,
    112.                     "y": -420.0
    113.                 },
    114.                 "width": 170.0,
    115.                 "guid": "d01f5f66-d7dc-4bfd-9ccb-2c4715088660",
    116.                 "$version": "A",
    117.                 "$type": "Bolt.FlowState",
    118.                 "$id": "15"
    119.             },
    120.             {
    121.                 "nest": {
    122.                     "source": "Embed",
    123.                     "macro": null,
    124.                     "embed": {
    125.                         "variables": {
    126.                             "collection": {
    127.                                 "$content": [],
    128.                                 "$version": "A"
    129.                             },
    130.                             "$version": "A"
    131.                         },
    132.                         "controlInputDefinitions": [],
    133.                         "controlOutputDefinitions": [],
    134.                         "valueInputDefinitions": [],
    135.                         "valueOutputDefinitions": [],
    136.                         "title": "Jump",
    137.                         "summary": null,
    138.                         "pan": {
    139.                             "x": 0.0,
    140.                             "y": 0.0
    141.                         },
    142.                         "zoom": 1.0,
    143.                         "elements": [
    144.                             {
    145.                                 "StateType": {
    146.                                     "StateType": "ExampleProject.Character.State.JumpState"
    147.                                 },
    148.                                 "defaultValues": {
    149.  
    150.                                 },
    151.                                 "position": {
    152.                                     "x": -114.0,
    153.                                     "y": -213.0
    154.                                 },
    155.                                 "guid": "ec3e24e5-bd9f-4511-9c3d-376753cbe77f",
    156.                                 "$version": "A",
    157.                                 "$type": "ExampleProjectStateHandler"
    158.                             }
    159.                         ],
    160.                         "$version": "A"
    161.                     }
    162.                 },
    163.                 "isStart": false,
    164.                 "position": {
    165.                     "x": -266.0,
    166.                     "y": 60.0
    167.                 },
    168.                 "width": 170.0,
    169.                 "guid": "5e6f24ba-910f-4c13-91c2-330629e768de",
    170.                 "$version": "A",
    171.                 "$type": "Bolt.FlowState",
    172.                 "$id": "27"
    173.             },
    174.             {
    175.                 "nest": {
    176.                     "source": "Embed",
    177.                     "macro": null,
    178.                     "embed": {
    179.                         "variables": {
    180.                             "collection": {
    181.                                 "$content": [],
    182.                                 "$version": "A"
    183.                             },
    184.                             "$version": "A"
    185.                         },
    186.                         "controlInputDefinitions": [],
    187.                         "controlOutputDefinitions": [],
    188.                         "valueInputDefinitions": [],
    189.                         "valueOutputDefinitions": [],
    190.                         "title": null,
    191.                         "summary": null,
    192.                         "pan": {
    193.                             "x": 0.0,
    194.                             "y": 0.0
    195.                         },
    196.                         "zoom": 1.0,
    197.                         "elements": [
    198.                             {
    199.                                 "defaultValues": {
    200.  
    201.                                 },
    202.                                 "position": {
    203.                                     "x": 100.0,
    204.                                     "y": -50.0
    205.                                 },
    206.                                 "guid": "4a5d2530-ca3f-4cb0-aa8f-3edb86c420e3",
    207.                                 "$version": "A",
    208.                                 "$type": "Bolt.TriggerStateTransition",
    209.                                 "$id": "49"
    210.                             },
    211.                             {
    212.                                 "StateEventType": {
    213.                                     "StateType": "ExampleProject.Character.State.AerialState",
    214.                                     "EventName": "OnLand"
    215.                                 },
    216.                                 "stateEventType": {
    217.                                     "StateType": "ExampleProject.Character.State.AerialState",
    218.                                     "EventName": "OnLand"
    219.                                 },
    220.                                 "outputArgs": [],
    221.                                 "OnEvent": {
    222.                                     "unit": {
    223.                                         "$ref": "51"
    224.                                     }
    225.                                 },
    226.                                 "defaultValues": {
    227.  
    228.                                 },
    229.                                 "position": {
    230.                                     "x": -185.0,
    231.                                     "y": -203.0
    232.                                 },
    233.                                 "guid": "1a5b4177-7cbe-48fd-b046-1abbc834fdb8",
    234.                                 "$version": "A",
    235.                                 "$type": "ExampleProjectStateEvent",
    236.                                 "$id": "51"
    237.                             },
    238.                             {
    239.                                 "sourceUnit": {
    240.                                     "$ref": "51"
    241.                                 },
    242.                                 "sourceKey": "Continue",
    243.                                 "destinationUnit": {
    244.                                     "$ref": "49"
    245.                                 },
    246.                                 "destinationKey": "trigger",
    247.                                 "guid": "e0f9ddc3-2c3d-4810-882b-dbe2f1898660",
    248.                                 "$type": "Bolt.ControlConnection"
    249.                             }
    250.                         ],
    251.                         "$version": "A"
    252.                     }
    253.                 },
    254.                 "source": {
    255.                     "$ref": "3"
    256.                 },
    257.                 "destination": {
    258.                     "$ref": "15"
    259.                 },
    260.                 "guid": "eede2fe3-7b22-41fe-875c-1506133e09ca",
    261.                 "$version": "A",
    262.                 "$type": "Bolt.FlowStateTransition"
    263.             },
    264.             {
    265.                 "nest": {
    266.                     "source": "Embed",
    267.                     "macro": null,
    268.                     "embed": {
    269.                         "variables": {
    270.                             "collection": {
    271.                                 "$content": [],
    272.                                 "$version": "A"
    273.                             },
    274.                             "$version": "A"
    275.                         },
    276.                         "controlInputDefinitions": [],
    277.                         "controlOutputDefinitions": [],
    278.                         "valueInputDefinitions": [],
    279.                         "valueOutputDefinitions": [],
    280.                         "title": null,
    281.                         "summary": null,
    282.                         "pan": {
    283.                             "x": 0.0,
    284.                             "y": 0.0
    285.                         },
    286.                         "zoom": 1.0,
    287.                         "elements": [
    288.                             {
    289.                                 "defaultValues": {
    290.  
    291.                                 },
    292.                                 "position": {
    293.                                     "x": 66.0,
    294.                                     "y": 38.0
    295.                                 },
    296.                                 "guid": "3d3f6cb5-7bb9-48d5-9323-28e7c980d31e",
    297.                                 "$version": "A",
    298.                                 "$type": "Bolt.TriggerStateTransition",
    299.                                 "$id": "66"
    300.                             },
    301.                             {
    302.                                 "StateEventType": {
    303.                                     "StateType": "ExampleProject.Character.State.GroundState",
    304.                                     "EventName": "OnLeaveGround"
    305.                                 },
    306.                                 "stateEventType": {
    307.                                     "StateType": "ExampleProject.Character.State.GroundState",
    308.                                     "EventName": "OnLeaveGround"
    309.                                 },
    310.                                 "outputArgs": [],
    311.                                 "OnEvent": {
    312.                                     "unit": {
    313.                                         "$ref": "68"
    314.                                     }
    315.                                 },
    316.                                 "defaultValues": {
    317.  
    318.                                 },
    319.                                 "position": {
    320.                                     "x": -218.0,
    321.                                     "y": -116.0
    322.                                 },
    323.                                 "guid": "63d43eb4-4062-4bb5-a9af-9cbc4642afca",
    324.                                 "$version": "A",
    325.                                 "$type": "ExampleProjectStateEvent",
    326.                                 "$id": "68"
    327.                             },
    328.                             {
    329.                                 "sourceUnit": {
    330.                                     "$ref": "68"
    331.                                 },
    332.                                 "sourceKey": "Continue",
    333.                                 "destinationUnit": {
    334.                                     "$ref": "66"
    335.                                 },
    336.                                 "destinationKey": "trigger",
    337.                                 "guid": "7fbba7e9-8a78-4950-ba9a-1907ecc2f4f7",
    338.                                 "$type": "Bolt.ControlConnection"
    339.                             }
    340.                         ],
    341.                         "$version": "A"
    342.                     }
    343.                 },
    344.                 "source": {
    345.                     "$ref": "15"
    346.                 },
    347.                 "destination": {
    348.                     "$ref": "3"
    349.                 },
    350.                 "guid": "5d4225f1-1c67-4c64-b9ec-f9b5ca831507",
    351.                 "$version": "A",
    352.                 "$type": "Bolt.FlowStateTransition"
    353.             },
    354.             {
    355.                 "nest": {
    356.                     "source": "Embed",
    357.                     "macro": null,
    358.                     "embed": {
    359.                         "variables": {
    360.                             "collection": {
    361.                                 "$content": [],
    362.                                 "$version": "A"
    363.                             },
    364.                             "$version": "A"
    365.                         },
    366.                         "controlInputDefinitions": [],
    367.                         "controlOutputDefinitions": [],
    368.                         "valueInputDefinitions": [],
    369.                         "valueOutputDefinitions": [],
    370.                         "title": null,
    371.                         "summary": null,
    372.                         "pan": {
    373.                             "x": -135.2189,
    374.                             "y": 0.0
    375.                         },
    376.                         "zoom": 1.0,
    377.                         "elements": [
    378.                             {
    379.                                 "defaultValues": {
    380.  
    381.                                 },
    382.                                 "position": {
    383.                                     "x": 100.0,
    384.                                     "y": -50.0
    385.                                 },
    386.                                 "guid": "44e20bb8-b2a4-473a-b9a8-d25891ab059a",
    387.                                 "$version": "A",
    388.                                 "$type": "Bolt.TriggerStateTransition",
    389.                                 "$id": "83"
    390.                             },
    391.                             {
    392.                                 "ActionDef": {
    393.                                     "ActionCollection": "InputActions",
    394.                                     "actionName": "Jump",
    395.                                     "actionMap": "Player"
    396.                                 },
    397.                                 "EventType": "Performed",
    398.                                 "outputArgs": [],
    399.                                 "defaultValues": {
    400.  
    401.                                 },
    402.                                 "position": {
    403.                                     "x": -253.0,
    404.                                     "y": -192.0
    405.                                 },
    406.                                 "guid": "7054ddd5-af97-45b1-9540-326f0a8c8621",
    407.                                 "$version": "A",
    408.                                 "$type": "InputActionEvent",
    409.                                 "$id": "85"
    410.                             },
    411.                             {
    412.                                 "defaultValues": {
    413.  
    414.                                 },
    415.                                 "position": {
    416.                                     "x": -498.0,
    417.                                     "y": -158.0
    418.                                 },
    419.                                 "guid": "b18e8c23-7243-415d-b80b-ccbd7034b9c3",
    420.                                 "$version": "A",
    421.                                 "$type": "Bolt.Self",
    422.                                 "$id": "88"
    423.                             },
    424.                             {
    425.                                 "sourceUnit": {
    426.                                     "$ref": "85"
    427.                                 },
    428.                                 "sourceKey": "Continue",
    429.                                 "destinationUnit": {
    430.                                     "$ref": "83"
    431.                                 },
    432.                                 "destinationKey": "trigger",
    433.                                 "guid": "1493ca70-b3be-43f5-8ec9-8a430840cbcd",
    434.                                 "$type": "Bolt.ControlConnection"
    435.                             },
    436.                             {
    437.                                 "sourceUnit": {
    438.                                     "$ref": "88"
    439.                                 },
    440.                                 "sourceKey": "self",
    441.                                 "destinationUnit": {
    442.                                     "$ref": "85"
    443.                                 },
    444.                                 "destinationKey": "Provider",
    445.                                 "guid": "6c9b9540-f88e-4100-8a4e-20118ccdeb20",
    446.                                 "$type": "Bolt.ValueConnection"
    447.                             }
    448.                         ],
    449.                         "$version": "A"
    450.                     }
    451.                 },
    452.                 "source": {
    453.                     "$ref": "15"
    454.                 },
    455.                 "destination": {
    456.                     "$ref": "27"
    457.                 },
    458.                 "guid": "506ed5e6-787e-43fb-beab-ea2dd0f920ad",
    459.                 "$version": "A",
    460.                 "$type": "Bolt.FlowStateTransition"
    461.             },
    462.             {
    463.                 "nest": {
    464.                     "source": "Embed",
    465.                     "macro": null,
    466.                     "embed": {
    467.                         "variables": {
    468.                             "collection": {
    469.                                 "$content": [],
    470.                                 "$version": "A"
    471.                             },
    472.                             "$version": "A"
    473.                         },
    474.                         "controlInputDefinitions": [],
    475.                         "controlOutputDefinitions": [],
    476.                         "valueInputDefinitions": [],
    477.                         "valueOutputDefinitions": [],
    478.                         "title": null,
    479.                         "summary": null,
    480.                         "pan": {
    481.                             "x": 0.0,
    482.                             "y": 0.0
    483.                         },
    484.                         "zoom": 1.0,
    485.                         "elements": [
    486.                             {
    487.                                 "defaultValues": {
    488.  
    489.                                 },
    490.                                 "position": {
    491.                                     "x": 100.0,
    492.                                     "y": -50.0
    493.                                 },
    494.                                 "guid": "fa96eefe-fb67-4ac1-9552-1e126cd80f64",
    495.                                 "$version": "A",
    496.                                 "$type": "Bolt.TriggerStateTransition",
    497.                                 "$id": "102"
    498.                             },
    499.                             {
    500.                                 "StateEventType": {
    501.                                     "StateType": "ExampleProject.Character.State.AerialState",
    502.                                     "EventName": "OnLand"
    503.                                 },
    504.                                 "stateEventType": {
    505.                                     "StateType": "ExampleProject.Character.State.AerialState",
    506.                                     "EventName": "OnLand"
    507.                                 },
    508.                                 "outputArgs": [],
    509.                                 "OnEvent": {
    510.                                     "unit": {
    511.                                         "$ref": "104"
    512.                                     }
    513.                                 },
    514.                                 "defaultValues": {
    515.  
    516.                                 },
    517.                                 "position": {
    518.                                     "x": -218.0,
    519.                                     "y": -122.0
    520.                                 },
    521.                                 "guid": "060db913-569c-4c7b-9239-1d13d9503dc3",
    522.                                 "$version": "A",
    523.                                 "$type": "ExampleProjectStateEvent",
    524.                                 "$id": "104"
    525.                             },
    526.                             {
    527.                                 "sourceUnit": {
    528.                                     "$ref": "104"
    529.                                 },
    530.                                 "sourceKey": "Continue",
    531.                                 "destinationUnit": {
    532.                                     "$ref": "102"
    533.                                 },
    534.                                 "destinationKey": "trigger",
    535.                                 "guid": "85072f90-3456-4f69-99fe-85179412574c",
    536.                                 "$type": "Bolt.ControlConnection"
    537.                             }
    538.                         ],
    539.                         "$version": "A"
    540.                     }
    541.                 },
    542.                 "source": {
    543.                     "$ref": "27"
    544.                 },
    545.                 "destination": {
    546.                     "$ref": "15"
    547.                 },
    548.                 "guid": "8b0863f1-8921-4643-bc45-f0c151312dd9",
    549.                 "$version": "A",
    550.                 "$type": "Bolt.FlowStateTransition"
    551.             }
    552.         ],
    553.         "$version": "A"
    554.     }
    555. }

    Why is Self node even trying to serialize anything ?

    Isnt that node just a refrence to stack.objectRoot , its really annoying.

    I have tried to decorate the Input with [
     
  2. Ex-Crow

    Ex-Crow

    Joined:
    Aug 14, 2020
    Posts:
    111
    To be clear, it happens in the editor when you're working with Bolt? If so, that's pretty weird.

    An issue with a build could be that you're testing on an AOT platform without running Tools/Bolt/AoT Pre-Build which can result in deserialization errors.

    The only instances of deserialization errors in the editor that are known to me are usually caused by deleting a custom node script with its node still being present in a graph somewhere. Bolt currently doesn't know how to recover from that. Native nodes like Self should not cause that, though.

    You could try resetting and regenerating units in Tools/Bolt/Unit Options Wizard to see if that helps.
     
  3. morphex

    morphex

    Joined:
    Dec 18, 2012
    Posts:
    112
    I am a bloody idiot. I didnt realize I was building IL2CPP which requires the AOT build .

    @Ex-Crow I would buy you a beer if I could!
     
    Last edited: Nov 25, 2020
    Ex-Crow likes this.