LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

General Protection Error using Table Control

Solved!
Go to solution

Hi everybody,

we're using a table control to display logfiles. Each table row represents a logfile entry. Additonally we've set up

some filter ctrls (string ctrls) to speed up filtering. Meaning only entries matching these substrings are shown. So everytime the filter options

changed we renew the table content. 

This is done by DeleteTableRows, checking for entries to display, InsertTableRows and SetTableCellRangeVals.

This is working fine.

 

But if we eliminate all content of the table (caused by the filter options) and then hitting a button (while focus is on the table) we get an General Protection Error on ProcessSystemEvents.

This only happens having inserted a large number of table rows before deleting all of them. For example a table with 5000x2 (rowsxcolumns) reduced to 0x2. 

1. Create a table control with 5000x2 (rows x columns) elements.

2. Delete all rows

3. Hit tab until the table control gets focus.

4. Hit e.g. Enter

=> Crash

 

Anyone has an idea? We've already "dimmed" the ctrl but this not help to avoid getting the focus on the table by hitting the tab button. Which then leads to a crash as well.

 

Thanks for the help

Philipp

0 Kudos
Message 1 of 28
(4,899 Views)

I was curious about this fact and tried to make a few tests: the GPF indeed happens after deleting table rows, even if the table control and individual cells are set in indicator mode. In this case tabbing on the panel the table cannot be made active, but you get the GPF if you simply pass the mouse over an area where rows were deleted.

Attached is a quick and dirty test that shows this: run the project, press Add Rows (you can tab into the table if it is hot and hover the mouse over it without any problem), next press Delete Rows: the program will delete all but one rows; in this moment if you move the mouse over the remaining row nothing happens. If you pass the mouse where rows were deleted you get the GPF. Even forcing a panel redraw with DisplayPanel immediately after DeleteTableRows does not prevent the error.

 

Tested in CVI2009SP1 and 2012SP1.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 28
(4,890 Views)

thanks for reproducing and setting up the example project. Hopefully it will help the NI people to locate the error

0 Kudos
Message 3 of 28
(4,887 Views)
Solution
Accepted by topic author pille

Yes, this is a known issue (396240), although it didn't make it in in time for the latest known issues update. Unfortunately there isn't a good workaround, other than just waiting for a fixed version to be released, which should happen soon.

 

Luis

0 Kudos
Message 4 of 28
(4,850 Views)

Thanks for the info!

 

Then we'll wait for the fix.

 

Regards

0 Kudos
Message 5 of 28
(4,836 Views)

I also found a very similar problem with "edit table control" in CVI 2012.Ho installed the latest update but the problem persists. In my case I have a Table control in indicator mode (but in other ways it is the same) and run the following:

1. load the panel with table control with 2x2 (rows x columns) and numeric elements "both scroll bars Enables".
2. Delete all rows
3. InsertTable 500 Rows.
4. Scroll manually dragging the bar vertically at the end of the scroll down to 2/3 times.
=> Crash

The problem occurs only if compiled in release mode. In debug mode never be crashed.

With CVI editor is open visualizzatla following error string:
FATAL RUN-TIME ERROR: Unknown source position, thread id 0x000012A8: The program has Caused a 'General Protection' fault at 0x684AA34A.


I tried different solution but none solves if not set the attribute scroll so vertical scroll bar only.
In this mode I have no longer had any crashes.

I do not know if my problem is the same as already reported.
I hope to be of help to solve the problem.

Thank you.
Greetings.

0 Kudos
Message 6 of 28
(4,798 Views)

@ Ior3N70

 

While I cannot help with the table control, since you are using the table only to display values I can suggest you to switch to a listbox control instead. Items in a listbox can be tailored to have proper alignment and some formatting (see the help for ItemLabel parameter in the command help and the example samples\userint\listdelx.prj)

 

Alternatively, a tree too can be tailored to mimic a table: see samples\userit\treelist.prj example for this. I don't know if the tree control has the same problems as the table control though.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 28
(4,787 Views)

The tree control does not have the same problem.

 

Luis

0 Kudos
Message 8 of 28
(4,772 Views)

Thank you very much for your advice.
The table control is graphically the best for what I'm supposed to accomplish.
Currently setting vertical scroll bar only, apparently has no more problems.
For your experience, I can trust that the table cotrol with this approach does not give more error?
Thank you.
Best Regards
Mirko

0 Kudos
Message 9 of 28
(4,761 Views)

Hello,

 

We are having a similar GPF with table control.

 

We have a custom test executive written in CVI2012 which uses a table control for displaying test steps.

 

Initially we load up test step information in the table (test limits, test information, etc.) in the table and then poke in test results in the table during execution of the test (i.e. SetTableCellAttribute, SetTableCellValue).  This update includes a *.ico file for graphical pass/fail result.

 

When we reach around 5000 steps/rows executed we do not see the graphical pass/fail result indicator and then subsequent focus on table causes a GPF.  The GPF seems to indicate crash happens in ProcessSystemEvents. (note that our execution is run under gui thread and we use ProcessSystemEvents to update control).   We have 10 columns in the table.

 

The question is do you think it could be related to issue described in this thread or possibly due to the repeated calls to ProcessSystemEvents?  I have tried hammering the GUI with mouse events and it always seems to happen after a certain amount of test steps.

 

Thank you,

0 Kudos
Message 10 of 28
(4,740 Views)