[ SOLVED ]Ignition as freezing for few minutes

Hi, Does anyone know why this happen?, I sounds like was lost but I don't know why and I could not did anything with the application in that time, the photo is from the app running and then just stop working like freezing.

image

That usually means you have a script running in the foreground thread that is taking seconds or more to run. Pretty much all scripting in Vision (events) originates on the UI (foreground) thread and must execute quickly to not block the user interface. Any time-consuming script must be delegated to a background thread to avoid this problem. (Using system.util.invokeAsynchronous().)

This commonly caused by calling functions that need to have the gateway do some work to obtain a result. Alarm status lookup and DB queries are worst offenders.

So, I am using system.util.invokeAsynchronous(), but how can I resolved?

Resolution requires implementing background operations or proper use of asynchronous bindings everywhere necessary in your code. That is not practical to figure out through the forum, though posting an export of your project might get someone to look at it. It probably is too much to ask of support, but that is your best bet.

Ignition scripting is very powerful, but that power makes it very easy to screw up, too. Your symptoms suggest inappropriate use of scripts that take a long time, or variable long time, to execute.

1 Like

Thank you so much