I am using ARKit ARSession; the first time around I use an ARSession, everything works perfectly. It is fully responsive. Then I pause the ARSession; set it to to NULL so that it gets dealloced and create a second time around sometime later.
The second time around it gets stuck with trackingState as ARTrackingStateLimited, with the reason being ARTrackingStateReasonInitializing. So the currentFrame does not change, it reamins the same however long I wait. If I reset with runWithConfiguration again, it returns me a new frame, but then the currentFrame is frozen, and again the trackingState is ARTrackingStateLimited, and reason as ARTrackingStateReasonInitializing.
Is there any reason why ARSession would fail to complete its initialization the second time around. It is exactly the same lighting conditions as the first pass; so it ought to be able to detect the same features. It is not a resource problem, because if there were a resource problem , ARKit would typically show a "Resource Constraints" diagnostic message.
First Run...
[ 53 ] allocARSession 0x13fe50900
[ 54 ] assignARDelegate <DropPodStage: 0x13ff34450>
[ 55 ] runARSession 0x13fe50900
-- perfect run here ; ARKit is fully responsive;
[ 86 ] pauseARSession 0x13fe50900
[ 87 ] assignARDelegate (null)
[ 88 ] releaseARSession 0x13fe50900
Second Run...
[ 150 ] allocARSession 0x13fd7a3c0
[ 151 ] assignARDelegate <DropPodStage: 0x13fe63fa0>
[ 152 ] runARSession 0x13fd7a3c0
[ 161 ] ARSession: cameraDidChangeTrackingState
[ 162 ] cameraDidChangeTrackingState: ARTrackingStateLimited
[ 163 ] cameraDidChangeTrackingState: trackingStateReason: ARTrackingStateReasonInitializing
[ 164 ] AR frames frozen for 10 seconds, resetting
[ 165 ] resetARSession
[ 166 ] ARTrackingStateLimited
[ 167 ] trackingStateReason: ARTrackingStateReasonInitializing
[ 168 ] AR frames frozen for 10 seconds, resetting
[ 169 ] resetARSession
[ 170 ] ARTrackingStateLimited
[ 171 ] trackingStateReason: ARTrackingStateReasonInitializing
Thanks for any responses on this;