2 Replies Latest reply on Jan 10, 2017 3:55 AM by arenol

    Reciving signal: "EXC_BAD_ACCESS" when attempting to transform TextFrameArt objects.

    arenol Level 1

      GDB is reciving signal: "EXC_BAD_ACESS" when I try to transform a TextFrameArt using the TransformArtSuite. Here is an exampke code.

      (Note I'still with CS5 SDK.)




      SetPointTextMatrix( AIArtHandle textArt, AIRealMatrix *matrix)


          AIErr error = kNoErr;


          int textType;

          VMGetTextType( textArt, &textType);


          if (textType == kPointTextType)


              /* since we cannot set the matrix directly, we need to calculate a

               tranformation and transform the object:


               Let C be the <currentMatrix>

               Let R be the final <matrix>

               Let T be the <transformation> matrix




                  R = C * T


               then we can calulate


                  T = inv(C) * R




              AIRealMatrix currentMatrix, transformation;

              GetPointTextMatrix( textArt, &currentMatrix);

              sMath->AIRealMatrixInvert( &currentMatrix);

              sMath->AIRealMatrixConcat( &currentMatrix, matrix, &transformation);


              /* THIS IS WHERE IT ALL GOES WRONG: - the content of the <transformation> matrix is OK */

              error = sTransformArt->TransformArt( textArt, &transformation, 1.0, kTransformObjects));


          return error;



      Anyone know why?