amazon-archives / aws-sdk-unity

ARCHIVED: The aws sdk for unity is now distributed as a part of aws sdk for dotnet:
https://github.com/aws/aws-sdk-net
Other
105 stars 43 forks source link

NullReferenceException of Analytics with Unity iOS-64bit build (IL2CPP scripting backend) #28

Closed zeroc closed 9 years ago

zeroc commented 9 years ago

Open AmazonMobileAnalyticsSample. In Player Settings, change iOS Scripting Backend to IL2CPP. Build project to export a 64-bit xcode project. Debug the project on an iOS device from XCode. The app will generate an exception when it tries to send records to AWS analytics service.

Unity version: 4.6.3 p1 iOS: 8.1.3 Model: iPad4,1 Date: Mon Mar 03 05:40:11 GMT-08:00 2015

NullReferenceException: A null value was found where an object instance was required. at Mono.Globalization.Unicode.SimpleCollator+Context..ctor (CompareOptions opt, System.Byte* alwaysMatchFlags, System.Byte* neverMatchFlags, System.Byte* buffer1, System.Byte* buffer2, System.Byte* prev1, Boolean quickCheckPossible) [0x00000] in :0 at Amazon.Runtime.Internal.Transform.WWWRequestData.FireRequest () [0x00000] in :0 at Amazon.Unity3D.AmazonMainThreadDispatcher+c__Iterator1.MoveNext () [0x00000] in :0 at Replacements.RemotingServices.CreateClientProxy (System.Type objectType, System.String url, System.Object[] activationAttributes) [0x00000] in :0 at UnityEngine.MonoBehaviour.StartCoroutine_Auto (IEnumerator routine) [0x00000] in :0 at UnityEngine.MonoBehaviour.StartCoroutine (IEnumerator routine) [0x00000] in :0 at Amazon.Unity3D.AmazonMainThreadDispatcher.Update () [0x00000] in :0 at Replacements.RemotingServices.CreateClientProxy (System.Type objectType, System.String url, System.Object[] activationAttributes) [0x00000] in :0 Replacements.RemotingServices:CreateClientProxy(Type, String, Object[]) UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) Amazon.Unity3D.AmazonMainThreadDispatcher:Update() Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])

(Filename: currently not available on il2cpp Line: -1)

zeroc commented 9 years ago

Any idea on this bug? This bug is critical for iOS apps now since Apple only accepts 64-bit builds.

Thank you.

zeroc commented 9 years ago

Just to follow up on the issue. The demp app works on mono 2.x back end but not on IL2CPP backend. It's can be easily produced on a 64-bit build. This bug still exists on latest version of Unity 4.6.3 p2

Here is the call stack:

NullReferenceException: A null value was found where an object instance was required. at Amazon.CognitoIdentity.Model.CreateIdentityPoolResult.IsSetSupportedLoginProviders () [0x00000] in :0 at Amazon.Runtime.Internal.Transform.WWWRequestData.FireRequest () [0x00000] in :0 at Amazon.Unity3D.AmazonMainThreadDispatcher+c__Iterator1.MoveNext () [0x00000] in :0 at Replacements.RemotingServices.CreateClientProxy (System.Type objectType, System.String url, System.Object[] activationAttributes) [0x00000] in :0 at UnityEngine.MonoBehaviour.StartCoroutine_Auto (IEnumerator routine) [0x00000] in :0 at UnityEngine.MonoBehaviour.StartCoroutine (IEnumerator routine) [0x00000] in :0 at Amazon.Unity3D.AmazonMainThreadDispatcher.Update () [0x00000] in :0 at Replacements.RemotingServices.CreateClientProxy (System.Type objectType, System.String url, System.Object[] activationAttributes) [0x00000] in :0 Replacements.RemotingServices:CreateClientProxy(Type, String, Object[]) UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) Amazon.Unity3D.AmazonMainThreadDispatcher:Update() Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])

(Filename: currently not available on il2cpp Line: 4294967295)

Thank you.

karthiksaligrama commented 9 years ago

Thank you for reporting this issue. We have raised a bug report to unity and are waiting for the fix. Once the patch for unity is out we will provide an updated version of the sdk.

karthiksaligrama commented 9 years ago

We have released a new version of the SDK (V1.0.3), could you please upgrade and tell us if the problem is still there in the new version? Please use unity 4.6.3p3 patch or equivalent or above.