ARCoreSession raises NullReferenceException on termination of application
It also occurs in HelloAR.
log:
NullReferenceException: Object reference not set to an instance of an object
GoogleARCoreInternal.ARCoreAndroidLifecycleManager.ResetSession () (at Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreAndroidLifecycleManager.cs:143)
GoogleARCore.ARCoreSession.OnDestroy () (at Assets/GoogleARCore/SDK/Scripts/ARCoreSession.cs:82)### VERSIONS USED
ARCore-unity-sdk 1.7
Unity 2018.3.5,2018.3.6
(use instant preview)
1.open helloAR scene.
2.Play
3.Stop
null check
ARCoreAndroidLifecycleManager.cs Line141
public void ResetSession()
{
if (OnSessionSetEnabled != null)
{
OnSessionSetEnabled(false);
_Initialize();
ExternApi.ArPresto_reset();
}
}
However, I feel that this method has not ended normally..
Experiencing the same issue. Same steps to reproduce. Using unity 2018.2.1.f1
Here the same with ARCore 1.7.0.
In 1.6.0 LifecycleManager.Instance.ResetSession(); was working just fine.
Now it's not working anymore and after Reset the Background renderer freezes and no tracking.
any update? I also met as same issue using unity 2018.3.f2
Help!!!
Also have this issue. However, it currently doesn't seem to be affecting anything. Running HelloAR with Instant Preview on a USB-connected Pixel 2 XL.
The source can be changed from
public void ResetSession()
{
OnSessionSetEnabled(false);
_Initialize();
ExternApi.ArPresto_reset();
}
to
public void ResetSession()
{
if (OnSessionSetEnabled != null)
{
OnSessionSetEnabled(false);
}
_Initialize();
ExternApi.ArPresto_reset();
}
since it seems like the rest of the file does a similar thing, without handling
OnSessionSetEnabled == null
Also have this issue. However, it currently doesn't seem to be affecting anything. Running HelloAR with Instant Preview on a USB-connected Pixel 2 XL.
The source can be changed from
public void ResetSession() { OnSessionSetEnabled(false); _Initialize(); ExternApi.ArPresto_reset(); }to
public void ResetSession() { if (OnSessionSetEnabled != null) { OnSessionSetEnabled(false); } _Initialize(); ExternApi.ArPresto_reset(); }since it seems like the rest of the file does a similar thing, without handling
OnSessionSetEnabled == null
Also have this issue. However, it currently doesn't seem to be affecting anything. Running HelloAR with Instant Preview on a USB-connected Pixel 2 XL.
The source can be changed from
public void ResetSession() { OnSessionSetEnabled(false); _Initialize(); ExternApi.ArPresto_reset(); }to
public void ResetSession() { if (OnSessionSetEnabled != null) { OnSessionSetEnabled(false); } _Initialize(); ExternApi.ArPresto_reset(); }since it seems like the rest of the file does a similar thing, without handling
OnSessionSetEnabled == null
This solves the issue seems like they forgot to check for null! Thanks
Most helpful comment
Also have this issue. However, it currently doesn't seem to be affecting anything. Running HelloAR with Instant Preview on a USB-connected Pixel 2 XL.
The source can be changed from
to
since it seems like the rest of the file does a similar thing, without handling