LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange behavior for memory allocation with structures

I noticed a strange behavior when allocating memory with structures.

The explanation is unfortunately a bit lengthy that's why it is in the attached Word document.

I attach also a test Program which features this behavior

Thank you if someone can help

Don't hesitate to ask if some additionnel explanation is necessary

 

0 Kudos
Message 1 of 4
(1,876 Views)

I forgot to tell that I'm on CVI2017

0 Kudos
Message 2 of 4
(1,865 Views)

Unfortunately you have a lengthy explanation of what you are doing and what does not work according to you, yet you don't provide the source code of your programming.

 

You mention in your document about modifying the InitMoveData1 function and then it works. According to my understanding of the intended data structure this modified function is the only way that initializing this data would make sense, so not knowing what you have done before the modification, I can't say what your problem is.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 4
(1,830 Views)

Sorry, I forgot the C file in the zip file.

Here it is.

Bertrand

0 Kudos
Message 4 of 4
(1,825 Views)