04-13-2014 04:05 AM
Hello,
I want to display a number of type ssize_t in a numeric table cell. In the UI editor, the cell has been set to intptr_t.
Running the code in debug64 works fine, in debug I receive the error message:
FATAL RUN-TIME ERROR: Invalid argument type: found 'int', expected '__int64'.
I have to add: in the UI editor I have created the table with one row only, I add more rows programmatically using InsertTableRows (but the cell types should be inherited). The error only shows up when filling the cell of the last row.
Ideas?
Solved! Go to Solution.
04-14-2014 03:32 AM
OK, let me add some more details:
1) I have designed a table in the UI editor which consists of 1 row and 11 columns
2) the number of rows gets adjusted at run time:
2a) by setting the number of visible rows (e.g. to 3)
2b) by inserting table rows (e.g. to 3-1: one row already exists)
3) Finally I populate the table using SetTableCellAttribute (,,,ATTR_CTRL_VAL, value );
if I run this code in debug 64, everything is fine, while in debug 32 the last call to TableCellAttribute (,,,ATTR_CTRL_VAL, value ); gives a fatal run time error.
If I modify 2b) by generating a table that has one more row, (inserting one more row), the code works fine as well: the last row is not used.
So obviously something goes wrong when a new table row is inserted AND the cell type is intptr_t AND CVI is in debug32 mode.
Since intptr_t is new I suspect it's a bug
04-14-2014 04:44 AM
Hi Wolfgang,
do you have a little example project to reproduce the issue?
You use LabWindows/CVI 2013 on Windows 7 64-bits?
Best regards
Suse
04-14-2014 05:03 AM
Hi Suse,
I am using CVI2013SP1 on Windows 7 64 bit.
Concerning the example... yes, in principle I could provide one but I was hoping that my description is detailed enough for NI to reproduce it.
04-14-2014 08:01 AM
Hi Wolfgang,
to have all the properties like you have it would be great to get your example.
Best regards
Suse
04-15-2014 03:41 AM - edited 04-15-2014 03:54 AM
Hi Suse,
I have prepared a demo, I hope it will work for you, too.
It behaves as described above: ok for debug64, but with a crash in debug32
Concerning the work-sharing... For CVI2013 alone I have reported almost 20 bugs, lets assume each one 'costs' me half a day... I am not getting paid for it and I did not get any discount on CVI...
04-16-2014 02:35 PM - edited 04-16-2014 02:39 PM
Hi Wolfgang,
The problem is this:
You can fix everything by simply replacing the third argument passed to InsertTableRows with -1.
Luis
04-17-2014 12:36 AM
Hi Luis,
thanks a lot for your analysis. I would almost agree... but
I do not understand you first statement... Where do you see that
The data type of its cell under column 5 is "int64".
And if so, how do I change this? (seems I am not so familiar with tables...)
04-18-2014 11:18 AM
I see it here:
It's okay for you to have intptr_t for the column. That, in conjunction with the fact that the table is in column mode, should ensure that all future cells under that column inherit intptr_t as their data type. However, the (5,1) cell that you already have still has int64. This must be because you created that row before you changed the data type for future cells.
Luis
04-18-2014 12:04 PM
@LuisG wrote:
However, the (5,1) cell that you already have still has int64. This must be because you created that row before you changed the data type for future cells.
Hi Luis,
thanks - you are correct (of course )
But...
If I change the default values there is a popup that tells me exactly this.... But it also seems to offer applying those changes to the existing cell. However it appears that clicking Yes has no effect...
I agree that it is my fault, I misunderstood this statement - it does not promise to actually apply the value, it only asks if I would like to...