Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CNiVectorT Exception

Following Code

CNiVectorT test;
test.Append(CNiVectorT(1,12.5));
test.Append(CNiVectorT(1,5.5));

I get a
First-chance exception in Soft2003.exe: 0xC0000005: Access Violation.

here

CNiVectorT& CNiVectorT::Append (const CNiVectorT& other) {
const unsigned int sizeOfThis = GetSize();
const unsigned int sizeOfOther = other.GetSize();
====> Resize(sizeOfThis + sizeOfOther);
for (unsigned int iOther=0, iThis=sizeOfThis; iOther < sizeOfOther; iOther++, iThis++) {
vectorData[iThis] = other.vectorData[iOther];
}
return *this;

i think i have found the problem but not the solution.

the variable size has a value of 774910000 and the correct should be 2 ?

D
oes someone know a soulution for this?
0 Kudos
Message 1 of 3
(2,957 Views)
Hello

Hmmm, I was unable to reproduce the problem. What version of Measurement Studio are you using. Can you step into the code for the Resize() function to see what function exactly is causing the problem? It's all Inline code, so you should have access to it.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 3
(2,957 Views)
Hello thank you for your answer.
I found the solution, it was a pointer problem.
An char array was to long and has overwritten the memory
0 Kudos
Message 3 of 3
(2,957 Views)