3 Replies
      Latest reply: Apr 12, 2018 12:18 AM by cujo30227 RSS
      cujo30227 Level 1 Level 1 (0 points)

        Hi,

         

        Since iOS11.3 I'm getting a significant number of new crash reports from my AR measurement app.

         

        The crash description says:

        Exception Type: SIGABRT

        Exception Codes: #0 at 0x181b112ec

        Crashed Thread: 0

        Application Specific Information: *** Terminating app due to uncaught exception 'std::invalid_argument', reason: 'extrinsicTransform must have determinant 1.'

         

        The crash is triggered by this line in my code, which is called on didUpdateFrame

        NSArray<ARHitTestResult *> *resultArray = [_arsnView hitTest:position types:ARHitTestResultTypeExistingPlaneUsingExtent | ARHitTestResultTypeEstimatedHorizontalPlane];

         

        According to the crash reporting, it happens to about 10% of the sessions (!!!!). Before iOS11.3, I had <0.1% crashes.

         

        I tried feeding the hitTest with different values for position, including NaN etc, but I'm not able to reproduce the crash.

         

        Any ideas?

         

        Thanks!!

        • Re: ARKit crashing in iOS11.3
          philh Level 1 Level 1 (0 points)

          We are also seeing:

           

          *** Terminating app due to uncaught exception 'std::invalid_argument', reason: 'extrinsicTransform must have determinant 1.'

           

          in our app as well, and only with iOS 11.3.

            • Re: ARKit crashing in iOS11.3
              3ZS Apple Staff Apple Staff (70 points)

              This looks like a symptom of hit testing when the tracking state is bad.

               

              This can occur when you perform a hit test and the ARCamera’s tracking state is either .notAvailable or .limited.

              https://developer.apple.com/documentation/arkit/arcamera.trackingstate

               

              The best practice is to simply not hit test when in either of those tracking states.

                • Re: ARKit crashing in iOS11.3
                  cujo30227 Level 1 Level 1 (0 points)

                  Yes, it is indeed related to the trackingState. I can confirm that the crash is gone when first performing a check on the trackingState, e.g.:

                   

                      if (_arsnView.session.currentFrame.camera.trackingState!=ARTrackingStateNormal)
                      {
                           // do not perform hitTest
                      }
                      else
                      {
                           // perform hitTest
                      }
                  

                   

                  In this example, _arsnView is a property from class ARSCNView