LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

pause ProcessSystemEvents

Why my program breaks at first ProcessSystemEvents() and then I hit Go button and works fine?
I don't have any breakpoints.
 
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 1 of 8
(4,870 Views)

Do you have any Watch Expressions in your project?

 

0 Kudos
Message 2 of 8
(4,856 Views)

no watch expressions.

it follows ProcessSystemEvents()....it follows first ProcessSystemEvents()...doesn't matter where ProcessSystemEvents is.

 

 

Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 3 of 8
(4,852 Views)

Any CVI expert out there?

Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 4 of 8
(4,787 Views)

test_man,

If you go to Run»Breakpoints does the window report any breakpoints?  It might be that somehow we created one inside the ProcessSystemEvents() code that we don't see.  We may also want to check the Break On options (Run»Break On), which by default is only set to break on Library Errors.  If these settings have changed it might be breaking on the You mention that this break occurs on the first instance of this call, even if you move it correct?  If possible can you comment out the instances to run the program without calling this function, and if so, does this break move to another set of code? I presume this problem is limited to this program?  If you can post a simplified version of this program we can take a look to see if we can reproduce the behavior on our end (it might be good to send the CVI project & workspace, not just the C files to get all of the settings).

John B.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 8
(4,758 Views)
Sorry for the late reply.
 
I simplified all the way here and it still breaks at ProcessSystemEvents();

CASE 1
 
int main (int argc, char *argv[])
{
 int status = ERROR;
 char buffer[SMALL] = {0};
 char computer_name[16] = {0};
 
// long error = 0;
 Ini_s tester;
 ProcessSystemEvents();    //program breaks here
return 0;
}
 
CASE 2
 
int main (int argc, char *argv[])
{
 int status = ERROR;
 char buffer[SMALL] = {0};
 char computer_name[16] = {0};
 
// long error = 0;
 Ini_s tester;
  
 if (InitCVIRTE (0, argv, 0) == 0)
 {
  return 0; /* out of memory */
 }
ProcessSystemEvents();  //program breaks here
return 0;
}
 
I also noticed that it takes about 8-10 seconds before it breaks. I don't have any breakpoints. I confiemed using breakpoint window. No break on first statement.
It breaks even if I put DisableBreakOnLibraryErrors (); just before ProcessSystemEvents(); 
 
May be problem with my include files or their sequence?
 
Here are my include files.
 
#include "windows.h"
#include <analysis.h>
#undef ERROR
#include "LV_Search_And_Replace.h"
#include "mmsystem.h"
#include <formatio.h>
#include <utility.h>
#include <cvirte.h>  
#include <userint.h>
#include "Tester_Core.h"
#include "I7000_Lib.h"
#include "toolbox.h"
#include <ansi_c.h>
#include "autoit.h"
#include "LVDS_CORE.h"
#include "CA_210_CORE.h"
#include "HD2102_CORE.h"
#include "time_in_sec.h"
#include "IPC115.h"
#include <rs232.h>
#include "E3632A_PS_Core.h"
 


Message Edited by test_man on 05-28-2008 02:52 PM
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 6 of 8
(4,537 Views)

test_man,

I think you might be on the right track that the error lies within the included files.  I can't run the complete code as I do not have all the header files you include, but if I include the ones I do have, the program runs fine.  The only line I have to skip in either program is Ini_s tester; since this seems to come from one of the libraries I do not have.  Therefore I wonder if this may be tied to that particular code since I am able to run the program normally without that line.  Based on this observation I might check into the header which pertains to this code since, as best as I can tell, it might be the source of our problem.  Even simpler, if we remove that code & its header does the program work?

John B.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(4,375 Views)

I found root cause of this problem. It was #include "time_in_sec.h"

This .h is from a dll I created in labview and it was causing this problem. May be that dll takes longer time to load.. Once I removed this h file it worked fine.

I didn't need that dll/h file for that project so it worked out ok.

Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 8 of 8
(4,368 Views)