10-01-2018 08:40 AM
Hello,
I am using a VI as a Popup to get some inputs from the user, which is having a while loop with an Event structure as shown in the attached image. Around 1 of every 5 times I launch this popup vi, it is getting hanged and I am not able to do any other actions since the popup is of model type.
I tried debugging this issue in many ways and finally using Event Inspector I observed that, sometimes the popup VI is getting stuck at the entry point of the Event Structure and timeout Cases are not inspected by the Event inspector and if I click on the controls in the UI of Popup VI, those events are getting queued but not at all getting executed.
Can anyone help me in finding the reason behind the Hanging of Popup VI.
10-01-2018 08:47 AM
Do you have an error coming into that VI? If so, the Error Case of the outer case will execute and not the No Error Case. Events will queue up, but there is no path for the event structure to execute.
What is happening in the Error case?
10-01-2018 08:52 AM - edited 10-01-2018 08:55 AM
HI RavensFan, I have clearly checked it, I have wired an empty error constant while calling this PopupVI and also observed using some file writing debugging methods that, the execution is entering While loop but no the Event structure.
10-01-2018 08:59 AM
Which events do you think are getting triggered but aren't executing?
What other events are in that VI besides the Login Value Change that is shown in the screen shot.
Attaching the actual VI will allow us to see all the code.
10-01-2018 09:04 AM
I have Only Timeout, Panel Close and Login Button Value Change events in the event structure. When i click Login Button, its Value Change is getting Queued in the Event Inspector Window, but even Timeout is not happening at that time and VI is hanged.
10-01-2018 09:26 AM
I still don't see an attached VI.
10-01-2018 09:29 AM
yeah, here i am attaching the popup VI.
10-01-2018 09:44 AM
I'm not seeing that problem at all.
Timeout seems to execute. And Login Value change executes when I hit the button.
10-01-2018 09:47 AM - edited 10-01-2018 10:00 AM
Edit:
Actually, I have no idea whether or not you want to keep this VI in memory or not. Is there anything else the timeout does besides make your loop spin once every 100 ms?
I have a feeling we don't know enough about how this VI is used, so we don't know how to replicate the issue.
10-01-2018 10:02 AM
@RavensFan wrote:
I'm not seeing that problem at all.
Timeout seems to execute. And Login Value change executes when I hit the button.
Time for a magic trick...
Breakpoints are removed during upload. What is in that timeout case? I can't see. Rolling something at 10Hz when looking for user interaction is often a mistake.