LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal run time error

I debug my app, a fatal run time error occured as below:
 
 FATAL RUN-TIME ERROR:   "gsm_rf_tester_main.c", line 289, col 63, thread id 0x0000053C:   Invalid argument type: found 'pointer to char', expected 'pointer to int'.
 
does anyone can help me?thanks
 
crystal
0 Kudos
Message 1 of 9
(4,626 Views)

Crystal, this kind of error is likely to happen when the control passed to the function is of incorrect type (e.g. you use SetCtrlVal (panel, control, "string") on a numeric control instead of a string control).

The most probable cause is that the panel handle is incorrect and points to a different panel from which you expect to. To fix this error check control ID and panel handle values.



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 9
(4,617 Views)
Hi,
thanks for your help. it works:-)
Yesterday evening I paste another error during debugging, could you pls look at below:
 
 gsm_rf_tester_main.c - 6 warnings
  894, 61   Warning: Local 'l_vChecklistId' has not been fully initialized.
  895, 61   Warning: Local 'l_vChecklistId' has not been fully initialized.
  896, 55   Warning: Local 'l_vChecklistId' has not been fully initialized.
  1644, 42   Warning: Local 'l_vChecklistId' has not been fully initialized.
  1645, 42   Warning: Local 'l_vChecklistId' has not been fully initialized.
  1646, 36   Warning: Local 'l_vChecklistId' has not been fully initialized.
The relative code is as below:
 
for (i=0;i<1;i++)
            {
                  GetCtrlAttribute(l_vTestConfigPanelHandle,l_vChecklistId[i],ATTR_ON_COLOR,&OnColor);
                  GetCtrlAttribute(l_vTestConfigPanelHandle,l_vChecklistId[i],ATTR_OFF_COLOR,&OffColor);
                  GetCtrlVal(l_vTestConfigPanelHandle,l_vChecklistId[i],&state);
                  if (state)  // ON
                      SetCtrlAttribute(l_vTestConfigPanelHandle,l_vButtonId[i],ATTR_CMD_BUTTON_COLOR,OnColor);// OFF COLOR
                  else        // OFF
                  {
                      SetCtrlAttribute(l_vTestConfigPanelHandle,l_vButtonId[i],ATTR_CMD_BUTTON_COLOR,OffColor);   // ON COLOR
                  }  
            }
   
    // Draw Events and Panels Immediately!
    ProcessDrawEvents ();                        
             DisplayPanel(l_vTestConfigPanelHandle); 
   
   break; 
 
Hope you can help me.
crystal
0 Kudos
Message 3 of 9
(4,615 Views)

Yes, I saw the message you are referring to but I cannot help you in this matter: I occasionally had this warning in my applications especially on array of structures, but after checking that each element of the array holds the correct values and that my program runs without problems in debug mode I gave no more importance to this and didn't look for an explanation.

Have you checked all the elements of the array? Do they contain valid values?



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 4 of 9
(4,611 Views)
i try to check them in my code
 
            l_vChecklistId[0]=TESTCONFIG_Check_Pwr;
            l_vChecklistId[1]=TESTCONFIG_Check_Mod;
            l_vChecklistId[2]=TESTCONFIG_Check_Swit;
            l_vChecklistId[3]=TESTCONFIG_Check_Ber;
            l_vChecklistId[4]=TESTCONFIG_CHECK_Sens;
            l_vChecklistId[5]=TESTCONFIG_CHECK_Desence_BT;
 
I can not find something wrong:-(  Maybe my debugging experience is so limit.
 
crystal 
0 Kudos
Message 5 of 9
(4,608 Views)
What about the declaration of the  variable?
int l_vChecklistId[6]; ?
Message 6 of 9
(4,595 Views)
Hi Roberto,
Thanks, I change int l_vChecklistId[12] to int l_vChecklistId[6],
then error disappeared.
crystal
0 Kudos
Message 7 of 9
(4,594 Views)
Thanks for the credits but I will transfer them to dilution which has given you the final solution Smiley Wink


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 8 of 9
(4,589 Views)
No problem Roberto. I can share the credits with you. 
0 Kudos
Message 9 of 9
(4,585 Views)