[PARSING ERROR] PS4 – French (France) settings breaks NC

Forums 💬 NodeCanvas ⚙️ Support [PARSING ERROR] PS4 – French (France) settings breaks NC

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17412
    cayou_montreal
    Participant

      Hi there !
      We are porting our game to PS4 and XboxOne, and so far NC was not causing any issues, but Sony EU itself found a blocker when setting the console to French (France) and then launching the game.
      When a AI is created inside the game, here is the log we get:

      Deserialization Error: ‘Error while parsing: Bad double format with 2.0; context = <{“version”:2.0,”type”:”NodeCanvas.BehaviourTrees.B>’
      04:00:14 ‘ at ParadoxNotion.Serialization.FullSerializer.fsResult.AssertSuccess () [0x0000d] in C:SubaeriaAssetsIllogikaNCNodeCanvas_ParadoxNotion (s
      04:00:14 hared)SerializationFullSerializerfsResult.cs:138
      04:00:14 at ParadoxNotion.Serialization.FullSerializer.fsJsonParser.Parse (System.String input) [0x0000c] in C:SubaeriaAssetsIllogikaNCNodeCanvas_Pa
      04:00:14 radoxNotion (shared)SerializationFullSerializerfsJsonParser.cs:469
      04:00:14 at ParadoxNotion.Serialization.JSON.Deserialize (System.Type type, System.String serializedState, System.Collections.Generic.List1 objectRefere
      04:00:14 nces) [0x00039] in C:SubaeriaAssetsIllogikaNCNodeCanvas_ParadoxNotion (shared)SerializationJSONSerializer.cs:53
      04:00:14 at ParadoxNotion.Serialization.JSON.Deserialize[GraphSerializationData] (System.String serializedState, System.Collections.Generic.List
      1 object
      04:00:14 References) [0x00000] in <filename unknown>:0
      04:00:14 at NodeCanvas.Framework.Graph.Deserialize (System.String serializedGraph, System.Collections.Generic.List1 objectReferences) [0x00024] in C:Su
      04:00:14 baeriaAssetsIllogikaNCNodeCanvasFrameworkGraphsGraph.cs:83 ‘
      04:00:14 Please report bug
      04:00:14 UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
      04:00:14 UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
      04:00:14 UnityEngine.Logger:Log(LogType, Object, Object)
      04:00:14 UnityEngine.Debug:LogError(Object, Object)
      04:00:14 Debug:LogError(Object, Object) (at C:SubaeriaAssetsFeaturesDebugDebug.cs:193)
      04:00:14 NodeCanvas.Framework.Graph:Deserialize(String, List
      1) (at C:SubaeriaAssetsIllogikaNCNodeCanvasFrameworkGraphsGraph.cs:94)
      04:00:14 NodeCanvas.Framework.Graph:OnAfterDeserialize() (at C:SubaeriaAssetsIllogikaNCNodeCanvasFrameworkGraphsGraph.cs:48)

      Looks like there is an issue when deserializing the graph. It only happens with this very specific language, everything is fine on all others.

      Unity 2017.2.0p4 and NodeCanvas unknown version (looks like beginning of 2017 if I’m not wrong).

      Feel free to ask me any more informations. Thanks !

      #17416
      cayou_montreal
      Participant

        It looks like in French double values are written like with a comma and not a dot (xx,xxx and not xx.xxx). That might explain why the parser can’t read them when opening the file on this system language. I will try to change the fsJsonParser TryParseNumber function.

        #17415
        cayou_montreal
        Participant

          Ok guys, I’ve fixed it by changing the way fsJonsParser is parsing double values.
          The issue was that double.TryParse with a value like “2.0” when the system is running in French (France) will fail because in French decimal values are written with a comma (2,0).
          So I had to change the call to double.TryParse, from:
          if (double.TryParse(numberString, out doubleValue) == false) {
          to:
          if (double.TryParse(numberString, NumberStyles.Number, CultureInfo.InvariantCulture, out doubleValue) == false) {

          I don’t know if this issue was fixed on recent version of NC, but if not, this might be a huge blocker.
          One more thing, I didn’t check the code, but maybe when serializing the BT in JSON the code should serialize it using no culture as well to avoid the same issue.

          Cheers !

          #17414
          Gavalakis
          Keymaster

            Hey,

            Thanks a lot 🙂
            I wasn’t aware, or even been reported something similar before, so it is a nice thing to know and be aware of now!
            Sounds like a good thing to take care of. I will make a pass in the serialization code.

            Thanks again !

            #17413
            cayou_montreal
            Participant

              Yeah sure, glad to help !

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