• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
Jan 09, 2017 Jan 09, 2017

Copy link to clipboard

Copied

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.)

AIErr

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

        

         Since,

        

            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?

TOPICS
SDK

Views

396

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Jan 10, 2017 Jan 10, 2017

My guess would be that there was a problem obtaining the Transform Art Suite so sTransformArt is not valid.

Votes

Translate

Translate
Adobe
Advocate ,
Jan 10, 2017 Jan 10, 2017

Copy link to clipboard

Copied

My guess would be that there was a problem obtaining the Transform Art Suite so sTransformArt is not valid.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 10, 2017 Jan 10, 2017

Copy link to clipboard

Copied

LATEST

I looked into it, and thought it was OK, But eventually I found the cultprit: a missing "&".

...

kAIRealMathSuite, kAIRealMathVersion, &sMath,
kAIHardSoftSuite, kAIHardSoftSuiteVersion, &sHardSoft,
kAITransformArtSuite, kAITransformArtSuiteVersion, sTransformArt,   <- missing "&".
kAIArtStyleSuite, kAIArtStyleSuiteVersion, &sArtStyle,
kAIBlendStyleSuite, kAIBlendStyleSuiteVersion,  &sBlendStyle,

...

Agnar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines