LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

processsystemevents freeze

Hi,

 

I don't know why, but since a day or two, when I use the process system event function, it get stuck at that function.

 

Any idea why???

 

Thanks

0 Kudos
Message 1 of 3
(2,921 Views)

Probably not stuck in that function per se, but more likely you've enabled processing of some system event, the handler for which is stuck.  Unless and until event processing completes, the synchronous ProcessSystemEvents call isn't going to return.  The event that's not returning might not even be in your process.

 

Do you have any timers, or some other process running in the background, or some i/o that's pending that could be locking up?  Any event handlers getting called and not returning?

 

Are you using critical sections, or any sort of synchronization mechanisms (e.g. semaphore, mutex, etc.) that could be hanging up?    If you have a common resource that you're synchronizing from an event handler, you could be seeing a lockup. 

 

You might try using task manager to see if you can spot a process / thread that's spin locking, though good designs generally don't use spin locks.  Or just pause the app in debug mode and see if you're process is stuck in an event handler (callback) that you've written.

 

There's always been a bit of mystery to just what the CVI RTE does in this function, I think NI's tried to explain a time or two over the years here on the discussion forum.  There's also a ProcessDrawEvents or somesuch that allows some subset of events to get processed, but the exact demarcation might be hard to determine.

 

 

0 Kudos
Message 2 of 3
(2,913 Views)

I have a async timer running for update data into a stripchart.

 

If I do break execution while it stuck, it break at a processSystemEvent call

0 Kudos
Message 3 of 3
(2,909 Views)