10-27-2016 04:36 AM
Solved! Go to Solution.
10-27-2016 06:50 AM
I don't understand why are you trapping that -43 error that is not supposed to happen on the first issue of InstallPopup.
If you want to wait for the user to press a button to dismiss the popup before proceeding you could for rxample place a Ok button without callback on the popup and do the following:
lTemp = SetBreakOnLibraryErrors(0); InstallPopup(pnlHndlError); while (TRUE) { GetUserEvent (1, 0, 0); } RemovePopup (0); // Next code to execute after popup is dismissed
10-27-2016 07:47 AM
10-27-2016 07:52 AM
Is the program multithreaded? If so and you create the popup in a thread other that the main one the panel may not be visible.
Can you create a small example similar to your actual app that exhibits the same behaviour for us to examine it?
10-27-2016 08:25 AM
10-27-2016 10:12 AM
Which windows timer are you referring to? If you are using CVI Asynchronous timers which are built on top of multimedia timers, then yes, they are multithreaded. Which means the popup should not be issued from inside the timer callback.
10-27-2016 09:05 PM
10-28-2016 02:35 AM
OK, keep us informed on this.
BTW, a UI timer (i.e. right-click on a panel and create a timer control) is NOT an asynchronous timer but is handled by the main thread (and is not guaranteed to run always and with a regular pace: there may be events that block or delay the event scheduling).
CVI Asynchronous timers are handled by the asynctmr.fp instrument which is normally located in <cvi folder>\toolslib\toolbox folder and must be loaded either in the Library menu or in the Instrument one.
See this knowledgebase entry and the relevant help page (and functions list).
10-28-2016 03:39 AM
Hi Roberto,
I am sorry for gave you wrong info, I am not using CVI asynchronous time, I am using UI timer and windows timer (created by SetTimer), and the windows timer may installpopup the error panel at some special condition. I think the windows timer maybe also multithread, and based on your advise, I changed it to a UI timer. The good news is our customer simply tested the app I modified, the issue doesn't happen again. They are doing cycling test now. I will tell your the final test result later.
Again, thanks very much!
11-04-2016 02:22 AM
Hi Roberto,
Thanks for your help!
Our customer has been finished the test. After we changed the timer to a UI timer and wait for user's click to removepopup, the issue never happened again!