LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

General Protection Fault inserting ring items in table cell

Solved!
Go to solution

I'm seeing GPFs in RunUserInterface when inserting ring items in a column cells of a table control.  It's repeatable now, although yesterday in development I'm pretty certain this was not happening.  Lovely, I know.

 

I've stripped my project down to bare bones.  Click the Add button to add rows.  Click the Fail or Pass ring controls in any row and watch the GPF fireworks!

 

What am I missing here?

0 Kudos
Message 1 of 5
(2,720 Views)

Hello Electro,

 

This seems indeed a but - CAR #637529 created.

The culprit is SetTableCellRingItemAttribute(embolden!) which breaks the internal state of the ring. Also setting other attributes with SetTableCellRingItemAttribute produce the failure.

The only workaround is to give up to embolden, sorry

 

Constantin=

Message 2 of 5
(2,687 Views)
Solution
Accepted by ElectroLund

After some more investigation I saw that SetTableCellRingItemAttribute is called with a wrong parameter.

 

// embolden!
SetTableCellRingItemAttribute(panel,
                                control,
                                MakePoint(column,row),
                                -1,
                                ATTR_BOLD,
                                TRUE);

 The 4th parameter, index has invalid value

index int The zero-based index specifying the ring item.

 

So actually it's not a CVI bug

Message 3 of 5
(2,673 Views)

Thanks for your help!  I was staring at this so long, I missed that index.

 

It's a shame that SetTableCellRingItemAttribute doesn't throw an error for out-of-index values.  Oh well.

0 Kudos
Message 4 of 5
(2,666 Views)

Yes, we'll keep around CAR #637529 with the purpose to throw a run-time error in case of invalid value of index parameter but it will have a lower priority

0 Kudos
Message 5 of 5
(2,658 Views)