故障排除,代码抛出OverflowException

时间:2019-06-23 18:27:43

标签: unity3d ibm-cloud ibm-watson watson-assistant

我正在尝试使用Watson的STT,Assistant和TTS服务为HoloLens构建UWP-App。当我使用带有.NET代码的Unity Play运行此项目时,一切正常。我可以与Watson交谈并收到回复。但是,当我通过IL2CPP将应用程序构建为UWP时,会收到OverflowException。

我正在使用Unity 2019.1.0f2和最新的ibm服务。引擎盖下的代码使用watson unity sdk(https://github.com/watson-developer-cloud/unity-sdk)。

我试图将整个代码分解为一个文件,在某些方面提高了代码质量,但我不知道为什么它不起作用。

这是在镜头上调试时收到的异常:

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 

我不知道将错误扔到哪里,因为这是我的第一个.NET / UWP App,它需要构建IL2CPP。当您想查看整个代码时,请查看我的仓库https://github.com/FabianPerl/WatsonSmartassistant

0 个答案:

没有答案