BUG: KeyNotFoundException (and fix) fsRecoveryProcessor

FlowCanvas Forums Support BUG: KeyNotFoundException (and fix) fsRecoveryProcessor

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2270
    drumstig
    Participant

    hi,

    when i tried building some assetbundles containing flowcanvas, the following error occured

    “KeyNotFoundException: The given key was not present in the dictionary.”

    after some digging i found that the problem was inside “fsRecoveryProcessor.cs”

    ..

    13.        private const string FIELD_NAME_TYPE = “_missingType”;

    14.        private const string FIELD_NAME_STATE = “_recoveryState”;

    ..

    however, inside the OnBeforeDeserialize(Type storageType, ref fsData data) function
    the data.AsDictionary  keys for missingType and recoveryState do not contain an underscore.

    for now i simply removed the underscore inside the fsRecoveryProcesser.cs file, and that seems to fix it.

    *note: i noticed that the other keys inside data.asDictionary contained an underscore, so this might not be a permanent solution,but it does the trick for now.

     

    #2271
    Gavalakis
    Keymaster

    Hello,

     

    Hmm. Did you maybe recently upgraded FlowCanvas, but between the upgrade you already had some missing nodes in some of your graphs by any chance?

    The serialized fields definetely do contain the underscore (you can confirm this by opening up the MissingNode.cs file for example), but this has recently changed. Thus, the only way I can see this happening is if you upgraded with some Missing Nodes already existing in some of your graphs like stated above.

    I would not really recomend making the change you mentioned because it would break the funcionality of finding missing node types and recovering them.

     

    Please let me know.

    Thank you.

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

    #2278
    drumstig
    Participant

    The serialized fields definetely do contain the underscore (you can confirm this by opening up the MissingNode.cs file for example), but this has recently changed. Thus, the only way I can see this happening is if you upgraded with some Missing Nodes already existing in some of your graphs like stated above.

    hi,

    yes i did an update to flowcanvas and it probably contained some missing nodes.
    im in the process of taking over a project, still searching for the flow script with the missing nodes

    for now i added an extra check on both with and withouth underscores

    OnBeforeDeserialize(

    var json = data.AsDictionary;
    FIELD_NAME_TYPE  = (json.ContainsKey(“_missingType”)) ? “_missingType” : “missingType”;
    FIELD_NAME_STATE = (json.ContainsKey(“_recoveryState”)) ? “_recoveryState” : “recoveryState”;

    #2279
    Gavalakis
    Keymaster

    Hey,

    Thanks for the follow up. Yep, I think this should work until all “missing nodes” are resolved (either removing them or creating/importing the missing type.

    Thanks!

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

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