Closed SaiDeekshith-SM6Tech closed 3 years ago
Hello @SaiDeekshith-SM6Tech, thanks for reaching out. It looks like your m_platformSessionHandle is a nullptr and that is triggering an assert. Can you include your code related to creating the m_platformSessionHandle? Can you step through the code and see where it becomes a nullptr?
Hi @SaiDeekshith-SM6Tech, I encountered the same issue and was able to find the cause and prevent it. In my case, this happened when I tried to start the ASA session before the AR Foundation session was ready. So you would need to make sure that the AR Foundation session is ready before trying to start the ASA session:
if (ARSession.state == ARSessionState.SessionTracking)
{
StartASA();
}
else
{
ARSession.stateChanged += ARSession_stateChanged;
}
...
private void ARSession_stateChanged(ARSessionStateChangedEventArgs args)
{
if (args.state == ARSessionState.SessionTracking)
{
StartASA();
ARSession.stateChanged -= ARSession_stateChanged;
}
}
Source: (Apparently unsafe link) https://gitmemory.com/issue/Azure/azure-spatial-anchors-samples/203/671537612
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
D/CBindingAutoGen: exception causing failure: LogException @ /Users/runner/work/1/s/SpatialServices/API/src/Android/AzureSpatialAnchorsApiNdk/Platform/ARCoreNdkPlatformSession.cpp:26, SpatialServices::ARCoreNdkPlatformSession::ARCoreNdkPlatformSession(ssc_platform_session_handle) : Assertion failed: m_platformSessionHandle != nullptr CallStack: ReposeStackWalker is not supported on this platform :-( 2020-11-13 12:04:33.243 23936-24007/? E/Unity: DemoScriptBase - Error in AdvanceDemo: LogException @ /Users/runner/work/1/s/SpatialServices/API/src/Android/AzureSpatialAnchorsApiNdk/Platform/ARCoreNdkPlatformSession.cpp:26, SpatialServices::ARCoreNdkPlatformSession::ARCoreNdkPlatformSession(ssc_platform_session_handle) : Assertion failed: m_platformSessionHandle != nullptr CallStack: ReposeStackWalker is not supported on this platform :-(. Request CV: . Response CV: . at Microsoft.Azure.SpatialAnchors.NativeLibraryHelpers.CheckStatus (System.IntPtr handle, Microsoft.Azure.SpatialAnchors.status value) [0x00000] in <00000000000000000000000000000000>:0 at Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession.Start () [0x00000] in <00000000000000000000000000000000>:0 at Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager+<>cDisplayClass46_0.b0 (UnityEngine.AndroidJavaObject unityActivity) [0x00000] in <00000000000000000000000000000000>:0
at System.Net.Http.Headers.HttpHeaders.SetValue[T] (System.String name, T valu
2020-11-13 12:07:41.493 23936-24007/? D/CBindingAutoGen: exception causing failure: LogException @ /Users/runner/work/1/s/SpatialServices/API/src/Android/AzureSpatialAnchorsApiNdk/Platform/ARCoreNdkPlatformSession.cpp:26, SpatialServices::ARCoreNdkPlatformSession::ARCoreNdkPlatformSession(ssc_platform_session_handle) : Assertion failed: m_platformSessionHandle != nullptr
CallStack:
ReposeStackWalker is not supported on this platform :-(
2020-11-13 12:07:41.547 23936-24007/? E/Unity: DemoScriptBase - Error in AdvanceDemo: LogException @ /Users/runner/work/1/s/SpatialServices/API/src/Android/AzureSpatialAnchorsApiNdk/Platform/ARCoreNdkPlatformSession.cpp:26, SpatialServices::ARCoreNdkPlatformSession::ARCoreNdkPlatformSession(ssc_platform_session_handle) : Assertion failed: m_platformSessionHandle != nullptr
CallStack:
ReposeStackWalker is not supported on this platform :-(. Request CV: . Response CV: . at Microsoft.Azure.SpatialAnchors.NativeLibraryHelpers.CheckStatus (System.IntPtr handle, Microsoft.Azure.SpatialAnchors.status value) [0x00000] in <00000000000000000000000000000000>:0
at Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession.Start () [0x00000] in <00000000000000000000000000000000>:0
at Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager+<>cDisplayClass46_0.b 0 (UnityEngine.AndroidJavaObject unityActivity) [0x00000] in <00000000000000000000000000000000>:0
at System.Net.Http.Headers.HttpHeaders.SetValue[T] (System.String name, T valu