LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI 2017 Bug - garbage when hovering over variable in debugger

When in debug mode, using a break point, then hovering over a variable, garbage is displayed even if all other indications show variable is populated correctly.

The specific scenario is as follows:

A character array is initialized with 20 bytes of memory using calloc().

The character array is populated with a value on the User interface using GetCtrlVal().

Hovering over the variable (once execution flow has moved beyond GetCtrlVal() statement) displays garbage.

However, the length of the actual contents matches expectations.  (in this case len2 == 😎

And, the Variables & Call Stack display indicates memory contains the intended value.

 

See attached power point for more details.

Thanks

 

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

Hi ryk,

 

I was able to create a similar example to the one you posted and was not able to replicate the behavior you are seeing. 

 

Forum.png

Are you seeing this same behavior with all variables on your computer or just in this instance?

 

 

0 Kudos
Message 2 of 4
(2,667 Views)

2Shanez,

 

No, I am not seeing this behavior consistently, but seemingly randomly.  A few lines down in the same code, same execution session as this anomaly occurred, I hovered over a different variable after having it populated in exactly the same way, and the debugger displayed the expected value properly.  And, as I mentioned in my original post, all other indications (output of strlen(), data seen in Variables and Call Stack viewer) were all as expected for the 8 byte, NULL terminated string. 

 

I have not yet been able to reproduce this behavior in any predictable fashion, but it has occurred on several occasions, and in random locations.  If I was pressed for a best guess at this point, the only thing I could offer is that after an extended time in a debug session, and having exited out via the Stop button as opposed to a normal end of execution, there may be an accumulation of lost resources, caused by memory/process leaks. (i.e. caused by skipping any free statements needed to free memory that is being allocated or lack of thread termination.).  This in turn could result in denying the debug environment sufficient resources. 

 

But this is just a guess.

 

Thanks for your observation,

Ryk

 

0 Kudos
Message 3 of 4
(2,660 Views)

Hi ryk,

 

Thanks for that additional information! How long does it usually take in a debug session before this starts occurring? If you avoid the stop button does this issue continue to appear?

 

Also,  how do you have your localization settings configured in Windows?

 

0 Kudos
Message 4 of 4
(2,638 Views)