LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Colors in a table all skewed in release mode

I'm using LAbWindows/CVI 6.0 with MSVC++ 6.0.

I have a table of string cells with 1200 rows and 12 columns.
I use SetTableCellRangeVals() to set the data in the table.
I need some color coding in the cell background to identify certain fail conditions and use SetTableCellAttribute() to set those.
So the first pass over the data sets the colors in the table and populates the array and then I call SetTableCellAttribute().

This works fine in debug mode, but in the release mode, I'm getting strange colors on some of the rows towards the middle of the table, which I'm I'm not setting anywhere in my program.

Any ideas on why this should be happening and how I can fix it?
Any help will be appreciated!

Thanks,
Swati
0 Kudos
Message 1 of 8
(3,942 Views)
Hello Swati,

Would it be possible for you to attach a small program/screen shot demonstrating the behavior you are seeing?

Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 8
(3,931 Views)
Hi Wendy,
I am attaching a screen shot and the code snippet that populates the table in question.

For the screen shot: my program is only setting the Red for failed and Green for Good, but the rest of the colors (yellow, dark blue,dark green) are just showing up.

Interestingly, I dont see the problem in Debug mode but only in the Release mode.

Thanks!
Swati
0 Kudos
Message 3 of 8
(3,883 Views)
Hello Swati,

Could you reattach your code and screenshot. It seems to have disappeared.

Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 4 of 8
(3,873 Views)
0 Kudos
Message 5 of 8
(3,874 Views)
0 Kudos
Message 6 of 8
(3,871 Views)
Hello swati505,

When you run your application in release mode, the discolored cells, are they always the same ones, or do they happen randomly? If they are always the same ones, if you call GetTableCellAttribute() with the background color attribute, what values are returned?

Are the values returned the default background color of your table cells, or are the colors a random RGB combination?

Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 7 of 8
(3,828 Views)
Hi Wendy,
Thanks so much, but I realized that the color variable was getting
clobbered in the release mode and hence leading to garbage colors.
Thanks for your help!
0 Kudos
Message 8 of 8
(3,756 Views)