ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AcArray Assertion Failed

1 REPLY 1
Reply
Message 1 of 2
Anonymous
269 Views, 1 Reply

AcArray Assertion Failed

Hello,

 

In myCustomEnt.h

 

class myCustomEnt: public acdbcurve{

 

public:

    void CalSomething(void);

...

private:

    AcArray<Int32> mType;

...

}

----------------------------------------------------------------------

in myCustomEnt.cpp

 

myCustomEnt::myCustomEnt(){   //Default Constructor

 

CalSomething(void);

}

 

void myCustomEnt::CalSomething(void){

  acutPrintf(_T("%d\n"), mType.length());  // mType.LogicalLength()=14 in the  initial input

  for (int i=0; i < Count; i++){   //Count = 14

       Int32 type = mType.at(i);

  }

}

 

Acad::ErrorStatus myCustomEnt:: subTransformBy(...){

CalSomething(void);

}

 

The expected output should be 14 only in the comment screen.

But, I see the output

1

2

3

...

13

14

 

Why the AcArray LogicalLength unexpected changed? This will lead the assertion failed, if NDEBUG not defined.

What should I do to avoid this assertion failure?

 

Thanks,

 

Jack

1 REPLY 1
Message 2 of 2
owenwengerd
in reply to: Anonymous

The portion of the code that you posted is not complete and will not compile. I'm not sure I understand the problem, but if the size is not what you expect, then you should determine when and why it changed.

--
Owen Wengerd
ManuSoft

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost