LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

'a custom control callback raised an exception' when Estimating number of elements in debugger

Hi,

 

I'm trying to examine a malloc'ed array of struct in the variables window.

When I try to set 'Estimated Number of Elements', I get a popup message 'a custom control callback raised an exception'. This occurs even if I set the estimated number to 1.

 

When I close this popup, the 'Estimated Number of Elements' popup has a busy mouse pointer, and does not respond to OK or cancel buttons. At this point I am forced to restart CVI. CVI itself is not hung, the taskbar icon responds to right-click, close window.

 

The issue occurs in both versions of CVI I have installed: 20.0.0 (49252) and 19.0.0 (49155).

 

Has anyone seen this before or have any suggestions?

 

Maybe related, maybe not, but the execution profiler does not work on either version of CVI on this PC. When enabled the code does nothing, forever..

 

min_rep_example:

Note the problem does not occur if I remove d1 from the structure and code.

 

 

 

 

#include <ansi_c.h>
#include <utility.h>

typedef struct struct_1_t {
	double d0;
	double d1;
} struct_1_t;

int MinRepEx(int sz)
{
	struct_1_t *struct_arr_ptr = malloc(sz * sizeof(struct_1_t));

	for(int i=0; i<sz; i++)
	{
		struct_arr_ptr[i].d0 = i * 1.0;
		struct_arr_ptr[i].d1 = i * 1.0 + 20.0;
	}

	for(int i=0; i<sz; i++)
	{
		printf("%.1f %.1f,   ", struct_arr_ptr[i].d0, struct_arr_ptr[i].d1);
	}
	
	Breakpoint();
	free(struct_arr_ptr);
	return 0;
}

int main (int argc, char *argv[])
{
	MinRepEx(5);
	return 0;
}

 

 

 

 

0 Kudos
Message 1 of 1
(581 Views)