AcArray Assertion Failed

AcArray Assertion Failed

Anonymous
Not applicable
534 Views
1 Reply
Message 1 of 2

AcArray Assertion Failed

Anonymous
Not applicable

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

0 Likes
535 Views
1 Reply
Reply (1)
Message 2 of 2

owenwengerd
Advisor
Advisor

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
0 Likes