SaladLab / Json.Net.Unity3D

Forked Newtonsoft.Json to support Unity3D
MIT License
918 stars 169 forks source link

Failed to Run Seralization weaver with command... #12

Open dtmnash opened 8 years ago

dtmnash commented 8 years ago

I love JSON.NET and am excited that someone has brought it to Unity3d. I'm using the Unity HoloLens Technical Preview 5.4.0f3-HTP and version 8.0.3 JSON.NET/JSON.NET.Unity3D

I had to use the workaround you've published for UWP apps but I keep running into a runtime exception when trying to parse an OData response to a model I built that represents the response.

Would appreciate your thoughts/suggestions.

Warning: unknown type System.AsyncCallback detected. Using reflection to gather its type information. Consider to reference it from your scripts so it can gathered during the build process.

(Filename: C:\buildslave\unity\build\Runtime/Scripting/Backend/DotNet/ScriptingTypeProvider_DotNet.cpp Line: 153)

Exception thrown: 'System.InvalidOperationException' in mscorlib.ni.dll InvalidOperationException: Handle is not initialized. at System.Runtime.InteropServices.GCHandle.FromIntPtr(IntPtr value) at UnityEngine.Internal.$MethodUtility.CreateInstanceAndInvokeDefaultConstructor(IntPtr type, UIntPtr argument0, Int64* argument1) at UnityEngineProxy.InternalCalls.PInvokeCalls.JsonUtility_CUSTOM_FromJson(IntPtr param_0, Int32 param_1) at UnityEngineProxy.InternalCalls.JsonUtility_CUSTOM_FromJson(String json, Type type) at UnityEngine.JsonUtility.FromJson[T](String json) at ShowDataOnGaze.d__3.MoveNext() at UnityEngine.SetupCoroutine.InvokeMoveNext(IEnumerator enumerator, IntPtr returnValueAddress) at UnityEngine.SetupCoroutine.$Invoke1InvokeMoveNext(Int64 instance, Int64* args) at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method) (Filename: Line: 0)

deniesposito commented 8 years ago

Any luck finding a solution?

veblush commented 8 years ago

@dtmnash From your callstack, there is a call to JsonUtility.FromJson which is not one of Json.Net but UnityEngine. Is it right callstack?