I'm trying to build an UWP-App for the HoloLens with the services STT, Assistant and TTS from Watson. When I'm running this project via Unity Play with .NET code, everything works fine. I can speak with Watson and receive an respond. However, when I'm building the App to UWP via IL2CPP, I get an OverflowException.
I'm working with Unity 2019.1.0f2 and the latest ibm services. Under the hood the code uses the watson unity sdk (https://github.com/watson-developer-cloud/unity-sdk).
I've tried to refractor the whole code into one file, improved the code quality on some points and I have no clue why it isn't working..
Here is the exception which I receive when debugging on the lens:
OverflowException: Value was either too large or too small for a character.
at System.Convert.ToChar (System.Int32 value) [0x00000] in <00000000000000000000000000000000>:0
at MiniJSON.Json+Parser.get_PeekChar () [0x00000] in <00000000000000000000000000000000>:0
at MiniJSON.Json+Parser.EatWhitespace () [0x00000] in <00000000000000000000000000000000>:0
at MiniJSON.Json+Parser.get_NextToken () [0x00000] in <00000000000000000000000000000000>:0
at MiniJSON.Json+Parser.ParseValue () [0x00000] in <00000000000000000000000000000000>:0
at MiniJSON.Json+Parser.Parse (System.String jsonString) [0x00000] in <00000000000000000000000000000000>:0
at MiniJSON.Json.Deserialize (System.String json) [0x00000] in <00000000000000000000000000000000>:0
at IBM.Cloud.SDK.Connection.RESTConnector.GetErrorMessage (System.String error) [0x00000] in <00000000000000000000000000000000>:0
at IBM.Cloud.SDK.Connection.RESTConnector+<ProcessRequestQueue>d__31.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at IBM.Cloud.SDK.Utilities.Runnable+Routine.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0
I have no clue where the error is threw because it's my first .NET/UWP App, which needs IL2CPP to be built. When you want to see the whole code, look at my repo https://github.com/FabianPerl/WatsonSmartassistant