01-05-2009 10:45 AM
08-05-2009 01:02 AM
I'm fighting with a similar issue.
I am getting a fatal run-time error while running a DLL either in debug or release mode. I get the following error when my program is exiting:
Unknown source position, thread ID 0x00000554: the program has caused a "general protection" fault at 001B:00C7CABA
I'm using CVI 8.0.1 / labview 8.2 on windows XP.
This issue happens on another PC using windows 2000.
I've tried Other Dll projects: they're are not affected by this RT error but I do not see significant difference with the actual DLL project.
I (re)create a fresh project from scratch: same RT error occurs.
Anyone have suggestions on a solution ??
08-05-2009 01:57 AM
For me it looks like it happens in version 8 only, but not quite sure
It might help to update to version 9.0.1
Hi frado
08-05-2009 02:36 AM
Thanks Andy,
all my customers are using CVI 8.0.1, It is not comfortable for me to switch to CVI 9.
As I'm not facing this issue with others DLL projects, I believe there is a solution using CVI 8.0.1.
01-12-2011 09:55 AM
hi,
I have the error message : Fatal RUN-TIME-ERROR Unknown source position, thread id 0x00000C4C: the program has caused a 'General Protection' fault at 0x686DACBF
and my code is :
int CVICALLBACK datasizemessage(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
int dlc,id;
int id_button,content;
switch(event)
{
case EVENT_COMMIT:
GetCtrlVal(panel, auto_panel_content_button, &content);
if(content!=0)
{
SetCtrlAttribute(panel, auto_panel_data_size_message, ATTR_DIMMED, 0);
GetCtrlVal(panel, auto_panel_data_size_message, &dlc);
}
else
{
SetCtrlAttribute(panel,auto_panel_data_size_message, ATTR_DIMMED, 1);
}
break;
}
return 0;
}
And is appear that when I comment the second GetCtrlVal the problem does not arrive.
The auto_panel_content_button is a checked button and auto_panel_data_size_message is Numeric.
Thank you for your help and sorry for my English
01-13-2011 11:17 AM
Hi,
May I ask what type of numeric you are using? By default, a numeric control will be a double data type. In your code, where you call "GetCtrlVal(panel, auto_panel_data_size_message, &dlc)", you are reading the value of that control into an int, which may explain why the error disappears when you comment out that line of code. Try changing your "dlc" variable to a double type, or change the numeric control to an integer type, and see if that resolves your problem.
02-21-2011 12:22 AM
I just now ran into this error.
I'm running CVI 8.5.1 on XP Pro.
It's related to a system() function call where I 'm doing a ping command string.
Debug mode doesn't see this problem.
It happened the first time I ran in release mode.
Twice it occurred at the first instance that the ping is performed.
Although running release mode, I had the IDE open.
Minimizing the IDE as well as adding a ProcessSystemEvents() statement after the system() function seemed to relieve this.
What does this error actually mean?
Advise ...
02-21-2011 06:15 PM
Are you calling the ping command in a callback? Is this a console application or does it use a user interface? Are you sure you must minimize the CVI IDE in order for SystemProcessEvents to fix this problem? Or will the command alone fix it?
Check out the documentation on ProcessSystemEvents. It gives us some clues to what could be going on.
02-22-2011 08:42 AM
I didn't go back to check/verify if the IDE being open was a factor.
I'll see if I can do that ..
- Jeff
Partial Code from CVI
char PingCommandString [256] = "";
char PingString [256] = "cmd /c ping -n 8 -w 1000 %s > \"%s\"";
// 8 pings with 1000ms timeout with output sent to file
//-------------------------------------------
...
// Send the Ping Command
sprintf( PingCommandString, PingString,"192.168.1.2", PingFileName );
sprintf(OperatorMessage, "<<< Executing system( %s ) >>>", PingCommandString);
PrintToTextbox (OPERATOR_TEXTBOX, OperatorMessage);
// The FATAL ERROR GPF occurred sometime after here and ReadFile error trap below
// because the command interpreter window was open.
Reply = system( PingCommandString );
ProcessSystemEvents(); // Added
if (Reply<0) { .. error trap code .. }
// Open the Ping File and get the Ping test Result String
OperatorDelay(1.0); // Added - This includes ProcessSystemEvents()
PingFileHandle = OpenFile ( PingFileName, VAL_READ_ONLY, VAL_OPEN_AS_IS, VAL_ASCII );
if ( PingFileHandle < 0 ) { .. error trap code .. }
ProcessSystemEvents(); // Added
Reply = ReadFile ( PingFileHandle, FileContentsString, 9990 );
if (Reply<0) { .. error trap code .. }
02-23-2011 05:17 PM
What is the exact error message you see? Is it the same as the one frenchstudent saw?